| 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 2.2 3.3 4.4 5.5 6.6 7.7 |
|
| 35 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
| 43 |
1.1 2.2 3.3 4.4 5.5 6.6 7.7 |
|
| 54 |
1.1 2.2 3.3 |
|
| 59 |
1.1 2.2 |
|
| 60 |
1.1 |
|
| 62 |
1.1 2.2 |
|
| 63 |
1.1 |
|
| 65 |
1.1 2.2 |
|
| 66 |
1.1 |
|
| 69 |
1.1 2.2 3.3 4.4 |
|
| 74 |
1.1 |