SimpleBean.java

1
package mock.context;
2
3
import java.util.Date;
4
5
import org.apache.commons.lang3.builder.EqualsBuilder;
6
import org.apache.commons.lang3.builder.HashCodeBuilder;
7
8
public class SimpleBean {
9
	private String name;
10
11
	private int value;
12
13
	private Date date;
14
15
	public SimpleBean(String name, int value, Date date) {
16
		super();
17
		this.name = name;
18
		this.value = value;
19
		this.date = date;
20
	}
21
22
	public SimpleBean(String name, int value) {
23
		this(name, value, null);
24
	}
25
26
	public String getName() {
27 7 1. getName : replaced return value with "" for mock/context/SimpleBean::getName → NO_COVERAGE
2. getName : replaced return value with "" for mock/context/SimpleBean::getName → TIMED_OUT
3. getName : replaced return value with "" for mock/context/SimpleBean::getName → KILLED
4. getName : replaced return value with "" for mock/context/SimpleBean::getName → KILLED
5. getName : replaced return value with "" for mock/context/SimpleBean::getName → KILLED
6. getName : replaced return value with "" for mock/context/SimpleBean::getName → KILLED
7. getName : replaced return value with "" for mock/context/SimpleBean::getName → KILLED
		return name;
28
	}
29
30
	public void setName(String name) {
31
		this.name = name;
32
	}
33
34
	public int getValue() {
35 7 1. getValue : replaced int return with 0 for mock/context/SimpleBean::getValue → SURVIVED
2. getValue : replaced int return with 0 for mock/context/SimpleBean::getValue → NO_COVERAGE
3. getValue : replaced int return with 0 for mock/context/SimpleBean::getValue → TIMED_OUT
4. getValue : replaced int return with 0 for mock/context/SimpleBean::getValue → KILLED
5. getValue : replaced int return with 0 for mock/context/SimpleBean::getValue → KILLED
6. getValue : replaced int return with 0 for mock/context/SimpleBean::getValue → KILLED
7. getValue : replaced int return with 0 for mock/context/SimpleBean::getValue → KILLED
		return value;
36
	}
37
38
	public void setValue(int value) {
39
		this.value = value;
40
	}
41
42
	public Date getDate() {
43 7 1. getDate : replaced return value with null for mock/context/SimpleBean::getDate → SURVIVED
2. getDate : replaced return value with null for mock/context/SimpleBean::getDate → NO_COVERAGE
3. getDate : replaced return value with null for mock/context/SimpleBean::getDate → TIMED_OUT
4. getDate : replaced return value with null for mock/context/SimpleBean::getDate → KILLED
5. getDate : replaced return value with null for mock/context/SimpleBean::getDate → KILLED
6. getDate : replaced return value with null for mock/context/SimpleBean::getDate → KILLED
7. getDate : replaced return value with null for mock/context/SimpleBean::getDate → KILLED
		return date;
44
	}
45
46
	public void setDate(Date date) {
47
		this.date = date;
48
	}
49
50
	@Override
51
	public String toString() {
52
		StringBuilder builder = new StringBuilder();
53
		builder.append("{\"name\": \"").append(name).append("\", \"value\": ").append(value).append(", \"date\": \"").append(date).append("\"}");
54 3 1. toString : replaced return value with "" for mock/context/SimpleBean::toString → NO_COVERAGE
2. toString : replaced return value with "" for mock/context/SimpleBean::toString → SURVIVED
3. toString : replaced return value with "" for mock/context/SimpleBean::toString → TIMED_OUT
		return builder.toString();
55
	}
56
57
	@Override
58
	public boolean equals(Object obj) {
59 2 1. equals : negated conditional → NO_COVERAGE
2. equals : negated conditional → KILLED
		if (obj == null) {
60 1 1. equals : replaced boolean return with true for mock/context/SimpleBean::equals → NO_COVERAGE
			return false;
61
		}
62 2 1. equals : negated conditional → SURVIVED
2. equals : negated conditional → NO_COVERAGE
		if (obj == this) {
63 1 1. equals : replaced boolean return with false for mock/context/SimpleBean::equals → NO_COVERAGE
			return true;
64
		}
65 2 1. equals : negated conditional → NO_COVERAGE
2. equals : negated conditional → KILLED
		if (obj.getClass() != getClass()) {
66 1 1. equals : replaced boolean return with true for mock/context/SimpleBean::equals → NO_COVERAGE
			return false;
67
		}
68
		SimpleBean rhs = (SimpleBean) obj;
69 4 1. equals : replaced boolean return with false for mock/context/SimpleBean::equals → NO_COVERAGE
2. equals : replaced boolean return with true for mock/context/SimpleBean::equals → SURVIVED
3. equals : replaced boolean return with true for mock/context/SimpleBean::equals → NO_COVERAGE
4. equals : replaced boolean return with false for mock/context/SimpleBean::equals → KILLED
		return new EqualsBuilder().append(name, rhs.name).append(value, rhs.value).append(date, rhs.date).isEquals();
70
	}
71
72
	@Override
73
	public int hashCode() {
74 1 1. hashCode : replaced int return with 0 for mock/context/SimpleBean::hashCode → NO_COVERAGE
		return new HashCodeBuilder().append(name).append(value).append(date).hashCode();
75
	}
76
}

Mutations

27

1.1
Location : getName
Killed by : oghamfremarker.it.FreeMarkerParserTest.nested(oghamfremarker.it.FreeMarkerParserTest)
replaced return value with "" for mock/context/SimpleBean::getName → KILLED

2.2
Location : getName
Killed by : oghamthymeleafv2.it.resolver.StringResourceResolverTest.text(oghamthymeleafv2.it.resolver.StringResourceResolverTest)
replaced return value with "" for mock/context/SimpleBean::getName → KILLED

3.3
Location : getName
Killed by : none
replaced return value with "" for mock/context/SimpleBean::getName → TIMED_OUT

4.4
Location : getName
Killed by : none
replaced return value with "" for mock/context/SimpleBean::getName → NO_COVERAGE

5.5
Location : getName
Killed by : oghamcore.ut.util.BeanUtilsTest.noOverrideSkipUnknown(oghamcore.ut.util.BeanUtilsTest)
replaced return value with "" for mock/context/SimpleBean::getName → KILLED

6.6
Location : getName
Killed by : oghamthymeleafv3.it.resolver.StringResourceResolverTest.text(oghamthymeleafv3.it.resolver.StringResourceResolverTest)
replaced return value with "" for mock/context/SimpleBean::getName → KILLED

7.7
Location : getName
Killed by : oghamall.it.email.FluentEmailTest.bodyTemplateString(oghamall.it.email.FluentEmailTest)
replaced return value with "" for mock/context/SimpleBean::getName → KILLED

35

1.1
Location : getValue
Killed by : none
replaced int return with 0 for mock/context/SimpleBean::getValue → SURVIVED

2.2
Location : getValue
Killed by : oghamthymeleafv3.it.resolver.StringResourceResolverTest.text(oghamthymeleafv3.it.resolver.StringResourceResolverTest)
replaced int return with 0 for mock/context/SimpleBean::getValue → KILLED

3.3
Location : getValue
Killed by : oghamall.it.email.FluentEmailTest.bodyTemplateString(oghamall.it.email.FluentEmailTest)
replaced int return with 0 for mock/context/SimpleBean::getValue → KILLED

4.4
Location : getValue
Killed by : none
replaced int return with 0 for mock/context/SimpleBean::getValue → TIMED_OUT

5.5
Location : getValue
Killed by : oghamthymeleafv2.it.resolver.StringResourceResolverTest.text(oghamthymeleafv2.it.resolver.StringResourceResolverTest)
replaced int return with 0 for mock/context/SimpleBean::getValue → KILLED

6.6
Location : getValue
Killed by : none
replaced int return with 0 for mock/context/SimpleBean::getValue → NO_COVERAGE

7.7
Location : getValue
Killed by : oghamfremarker.it.FreeMarkerParserTest.nested(oghamfremarker.it.FreeMarkerParserTest)
replaced int return with 0 for mock/context/SimpleBean::getValue → KILLED

43

1.1
Location : getDate
Killed by : oghamthymeleafv2.it.ThymeleafParserTest.english(oghamthymeleafv2.it.ThymeleafParserTest)
replaced return value with null for mock/context/SimpleBean::getDate → KILLED

2.2
Location : getDate
Killed by : oghamthymeleafv3.it.ThymeleafParserTest.french(oghamthymeleafv3.it.ThymeleafParserTest)
replaced return value with null for mock/context/SimpleBean::getDate → KILLED

3.3
Location : getDate
Killed by : oghamfremarker.it.FreeMarkerParserTest.french(oghamfremarker.it.FreeMarkerParserTest)
replaced return value with null for mock/context/SimpleBean::getDate → KILLED

4.4
Location : getDate
Killed by : oghamcore.ut.util.BeanUtilsTest.noOverrideSkipUnknown(oghamcore.ut.util.BeanUtilsTest)
replaced return value with null for mock/context/SimpleBean::getDate → KILLED

5.5
Location : getDate
Killed by : none
replaced return value with null for mock/context/SimpleBean::getDate → SURVIVED

6.6
Location : getDate
Killed by : none
replaced return value with null for mock/context/SimpleBean::getDate → TIMED_OUT

7.7
Location : getDate
Killed by : none
replaced return value with null for mock/context/SimpleBean::getDate → NO_COVERAGE

54

1.1
Location : toString
Killed by : none
replaced return value with "" for mock/context/SimpleBean::toString → NO_COVERAGE

2.2
Location : toString
Killed by : none
replaced return value with "" for mock/context/SimpleBean::toString → TIMED_OUT

3.3
Location : toString
Killed by : none
replaced return value with "" for mock/context/SimpleBean::toString → SURVIVED

59

1.1
Location : equals
Killed by : oghamcore.ut.util.BeanUtilsTest.unknownPropertyOverrideSkip(oghamcore.ut.util.BeanUtilsTest)
negated conditional → KILLED

2.2
Location : equals
Killed by : none
negated conditional → NO_COVERAGE

60

1.1
Location : equals
Killed by : none
replaced boolean return with true for mock/context/SimpleBean::equals → NO_COVERAGE

62

1.1
Location : equals
Killed by : none
negated conditional → SURVIVED

2.2
Location : equals
Killed by : none
negated conditional → NO_COVERAGE

63

1.1
Location : equals
Killed by : none
replaced boolean return with false for mock/context/SimpleBean::equals → NO_COVERAGE

65

1.1
Location : equals
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : equals
Killed by : oghamcore.ut.util.BeanUtilsTest.unknownPropertyOverrideSkip(oghamcore.ut.util.BeanUtilsTest)
negated conditional → KILLED

66

1.1
Location : equals
Killed by : none
replaced boolean return with true for mock/context/SimpleBean::equals → NO_COVERAGE

69

1.1
Location : equals
Killed by : oghamcore.ut.util.BeanUtilsTest.unknownPropertyOverrideSkip(oghamcore.ut.util.BeanUtilsTest)
replaced boolean return with false for mock/context/SimpleBean::equals → KILLED

2.2
Location : equals
Killed by : none
replaced boolean return with false for mock/context/SimpleBean::equals → NO_COVERAGE

3.3
Location : equals
Killed by : none
replaced boolean return with true for mock/context/SimpleBean::equals → SURVIVED

4.4
Location : equals
Killed by : none
replaced boolean return with true for mock/context/SimpleBean::equals → NO_COVERAGE

74

1.1
Location : hashCode
Killed by : none
replaced int return with 0 for mock/context/SimpleBean::hashCode → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT OGHAM