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 2.2 3.3 4.4 5.5 |
|
24 |
1.1 2.2 |
|
29 |
1.1 2.2 |
|
30 |
1.1 |
|
32 |
1.1 2.2 |
|
33 |
1.1 |
|
35 |
1.1 2.2 |
|
36 |
1.1 |
|
39 |
1.1 2.2 3.3 4.4 |
|
44 |
1.1 |