NestedBean.java

1
package mock.context;
2
3
import org.apache.commons.lang3.builder.EqualsBuilder;
4
import org.apache.commons.lang3.builder.HashCodeBuilder;
5
6
7
8
public class NestedBean {
9
	private Object nested;
10
11
	public NestedBean(Object nested) {
12
		super();
13
		this.nested = nested;
14
	}
15
16
	public Object getNested() {
17 5 1. getNested : replaced return value with null for mock/context/NestedBean::getNested → NO_COVERAGE
2. getNested : replaced return value with null for mock/context/NestedBean::getNested → KILLED
3. getNested : replaced return value with null for mock/context/NestedBean::getNested → KILLED
4. getNested : replaced return value with null for mock/context/NestedBean::getNested → KILLED
5. getNested : replaced return value with null for mock/context/NestedBean::getNested → KILLED
		return nested;
18
	}
19
20
	@Override
21
	public String toString() {
22
		StringBuilder builder = new StringBuilder();
23
		builder.append("{\"nested\": ").append(nested).append("}");
24 2 1. toString : replaced return value with "" for mock/context/NestedBean::toString → SURVIVED
2. toString : replaced return value with "" for mock/context/NestedBean::toString → NO_COVERAGE
		return builder.toString();
25
	}
26
	
27
	@Override
28
	public boolean equals(Object obj) {
29 2 1. equals : negated conditional → NO_COVERAGE
2. equals : negated conditional → KILLED
		if (obj == null) {
30 1 1. equals : replaced boolean return with true for mock/context/NestedBean::equals → NO_COVERAGE
			return false;
31
		}
32 2 1. equals : negated conditional → NO_COVERAGE
2. equals : negated conditional → SURVIVED
		if (obj == this) {
33 1 1. equals : replaced boolean return with false for mock/context/NestedBean::equals → NO_COVERAGE
			return true;
34
		}
35 2 1. equals : negated conditional → NO_COVERAGE
2. equals : negated conditional → KILLED
		if (obj.getClass() != getClass()) {
36 1 1. equals : replaced boolean return with true for mock/context/NestedBean::equals → NO_COVERAGE
			return false;
37
		}
38
		NestedBean rhs = (NestedBean) obj;
39 4 1. equals : replaced boolean return with false for mock/context/NestedBean::equals → NO_COVERAGE
2. equals : replaced boolean return with true for mock/context/NestedBean::equals → SURVIVED
3. equals : replaced boolean return with true for mock/context/NestedBean::equals → NO_COVERAGE
4. equals : replaced boolean return with false for mock/context/NestedBean::equals → KILLED
		return new EqualsBuilder().append(nested, rhs.nested).isEquals();
40
	}
41
	
42
	@Override
43
	public int hashCode() {
44 1 1. hashCode : replaced int return with 0 for mock/context/NestedBean::hashCode → NO_COVERAGE
		return new HashCodeBuilder().append(nested).hashCode();
45
	}
46
}

Mutations

17

1.1
Location : getNested
Killed by : oghamfremarker.it.FreeMarkerParserTest.nested(oghamfremarker.it.FreeMarkerParserTest)
replaced return value with null for mock/context/NestedBean::getNested → KILLED

2.2
Location : getNested
Killed by : none
replaced return value with null for mock/context/NestedBean::getNested → NO_COVERAGE

3.3
Location : getNested
Killed by : oghamcore.ut.util.BeanUtilsTest.overrideSkipUnknown(oghamcore.ut.util.BeanUtilsTest)
replaced return value with null for mock/context/NestedBean::getNested → KILLED

4.4
Location : getNested
Killed by : oghamthymeleafv2.it.ThymeleafParserTest.nested(oghamthymeleafv2.it.ThymeleafParserTest)
replaced return value with null for mock/context/NestedBean::getNested → KILLED

5.5
Location : getNested
Killed by : oghamthymeleafv3.it.ThymeleafParserTest.nested(oghamthymeleafv3.it.ThymeleafParserTest)
replaced return value with null for mock/context/NestedBean::getNested → KILLED

24

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

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

29

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

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

30

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

32

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

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

33

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

35

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

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

36

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

39

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

2.2
Location : equals
Killed by : oghamcore.ut.util.BeanUtilsTest.nullNestedBeanSkip(oghamcore.ut.util.BeanUtilsTest)
replaced boolean return with false for mock/context/NestedBean::equals → KILLED

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

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

44

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

Active mutators

Tests examined


Report generated by PIT OGHAM