NestedBean.java

1
package mock.context;
2
3
import ogham.testing.org.apache.commons.lang3.builder.EqualsBuilder;
4
import ogham.testing.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 1 1. getNested : replaced return value with null for mock/context/NestedBean::getNested → RUN_ERROR
		return nested;
18
	}
19
20
	@Override
21
	public String toString() {
22
		StringBuilder builder = new StringBuilder();
23
		builder.append("{\"nested\": ").append(nested).append("}");
24 1 1. toString : replaced return value with "" for mock/context/NestedBean::toString → RUN_ERROR
		return builder.toString();
25
	}
26
	
27
	@Override
28
	public boolean equals(Object obj) {
29 1 1. equals : negated conditional → RUN_ERROR
		if (obj == null) {
30 1 1. equals : replaced boolean return with true for mock/context/NestedBean::equals → NO_COVERAGE
			return false;
31
		}
32 1 1. equals : negated conditional → RUN_ERROR
		if (obj == this) {
33 1 1. equals : replaced boolean return with false for mock/context/NestedBean::equals → NO_COVERAGE
			return true;
34
		}
35 1 1. equals : negated conditional → RUN_ERROR
		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 2 1. equals : replaced boolean return with false for mock/context/NestedBean::equals → RUN_ERROR
2. equals : replaced boolean return with true for mock/context/NestedBean::equals → RUN_ERROR
		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 :
replaced return value with null for mock/context/NestedBean::getNested → RUN_ERROR

24

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

29

1.1
Location : equals
Killed by :
negated conditional → RUN_ERROR

30

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

32

1.1
Location : equals
Killed by :
negated conditional → RUN_ERROR

33

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

35

1.1
Location : equals
Killed by :
negated conditional → RUN_ERROR

36

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

39

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

2.2
Location : equals
Killed by :
replaced boolean return with true for mock/context/NestedBean::equals → RUN_ERROR

44

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

Active mutators

Tests examined


Report generated by PIT 1.13.1