1
|
|
package org.cardanofoundation.explorer.api.model.response.protocol; |
2
|
|
|
3
|
|
import java.util.Date; |
4
|
|
import java.util.Objects; |
5
|
|
import java.util.Set; |
6
|
|
|
7
|
|
import lombok.AllArgsConstructor; |
8
|
|
import lombok.Builder; |
9
|
|
import lombok.Data; |
10
|
|
import lombok.NoArgsConstructor; |
11
|
|
|
12
|
|
import com.fasterxml.jackson.annotation.JsonIgnore; |
13
|
|
import com.fasterxml.jackson.annotation.JsonInclude; |
14
|
|
import com.fasterxml.jackson.annotation.JsonInclude.Include; |
15
|
|
|
16
|
|
import org.cardanofoundation.explorer.api.common.constant.CommonConstant; |
17
|
|
import org.cardanofoundation.explorer.api.common.enumeration.ProtocolStatus; |
18
|
|
|
19
|
1
1. toString : replaced return value with "" for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::toString → NO_COVERAGE
|
@Data |
20
|
9
1. toString : replaced return value with "" for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::toString → NO_COVERAGE
2. builder : replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::builder → KILLED
3. costModelId : replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::costModelId → KILLED
4. transactionHashs : replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::transactionHashs → KILLED
5. epochNo : replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::epochNo → KILLED
6. status : replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::status → KILLED
7. time : replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::time → KILLED
8. value : replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::value → KILLED
9. build : replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::build → KILLED
|
@Builder |
21
|
|
@NoArgsConstructor |
22
|
|
@AllArgsConstructor |
23
|
|
@JsonInclude(value = Include.NON_NULL) |
24
|
|
public class ProtocolHistory { |
25
|
|
|
26
|
1
1. getTime : replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getTime → NO_COVERAGE
|
Date time; |
27
|
1
1. getTransactionHashs : replaced return value with Collections.emptySet for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getTransactionHashs → NO_COVERAGE
|
Set<String> transactionHashs; |
28
|
1
1. getValue : replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getValue → KILLED
|
Object value; |
29
|
1
1. getStatus : replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getStatus → KILLED
|
ProtocolStatus status; |
30
|
1
1. getCostModelId : replaced Long return value with 0L for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getCostModelId → SURVIVED
|
@JsonIgnore Long costModelId; |
31
|
1
1. getEpochNo : replaced Integer return value with 0 for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getEpochNo → KILLED
|
Integer epochNo; |
32
|
|
|
33
|
|
@Override |
34
|
|
public boolean equals(Object o) { |
35
|
1
1. equals : negated conditional → KILLED
|
if (this == o) { |
36
|
1
1. equals : replaced boolean return with false for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::equals → NO_COVERAGE
|
return true; |
37
|
|
} |
38
|
1
1. equals : negated conditional → KILLED
|
if (!(o instanceof ProtocolHistory)) { |
39
|
1
1. equals : replaced boolean return with true for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::equals → NO_COVERAGE
|
return false; |
40
|
|
} |
41
|
|
ProtocolHistory that = (ProtocolHistory) o; |
42
|
|
|
43
|
2
1. equals : negated conditional → KILLED
2. equals : negated conditional → KILLED
|
if (Objects.isNull(value) || Objects.isNull(that.value)) { |
44
|
3
1. equals : negated conditional → NO_COVERAGE
2. equals : negated conditional → NO_COVERAGE
3. equals : replaced boolean return with true for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::equals → NO_COVERAGE
|
return Objects.isNull(value) && Objects.isNull(that.value); |
45
|
|
} |
46
|
|
|
47
|
2
1. equals : replaced boolean return with true for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::equals → KILLED
2. equals : replaced boolean return with false for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::equals → KILLED
|
return Objects.equals(value.hashCode(), that.value.hashCode()); |
48
|
|
} |
49
|
|
|
50
|
|
@Override |
51
|
|
public int hashCode() { |
52
|
1
1. hashCode : replaced int return with 0 for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::hashCode → SURVIVED
|
return CommonConstant.hashCode(value, status); |
53
|
|
} |
54
|
|
} |
| | Mutations |
19 |
|
1.1 Location : toString Killed by : none replaced return value with "" for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::toString → NO_COVERAGE
|
20 |
|
1.1 Location : builder Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testMapProtocols_thenReturnCostModelNull()] replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::builder → KILLED 2.2 Location : costModelId Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testChangedCostModelThatShouldNotChooseTheLatest()] replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::costModelId → KILLED 3.3 Location : transactionHashs Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testMapProtocols_thenReturnCostModelNull()] replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::transactionHashs → KILLED 4.4 Location : epochNo Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testGetLatestChange_thenReturn()] replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::epochNo → KILLED 5.5 Location : status Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testAddedHistoriesDecentralisation()] replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::status → KILLED 6.6 Location : time Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testMapProtocols_thenReturnCostModelNull()] replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::time → KILLED 7.7 Location : value Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testMapProtocols_thenReturnCostModelNull()] replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::value → KILLED 8.8 Location : toString Killed by : none replaced return value with "" for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::toString → NO_COVERAGE 9.9 Location : build Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testMapProtocols_thenReturnCostModelNull()] replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory$ProtocolHistoryBuilder::build → KILLED
|
26 |
|
1.1 Location : getTime Killed by : none replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getTime → NO_COVERAGE
|
27 |
|
1.1 Location : getTransactionHashs Killed by : none replaced return value with Collections.emptySet for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getTransactionHashs → NO_COVERAGE
|
28 |
|
1.1 Location : getValue Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testMapProtocols_thenReturn()] replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getValue → KILLED
|
29 |
|
1.1 Location : getStatus Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testChangeHistoryChangeEpoch2()] replaced return value with null for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getStatus → KILLED
|
30 |
|
1.1 Location : getCostModelId Killed by : none replaced Long return value with 0L for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getCostModelId → SURVIVED
|
31 |
|
1.1 Location : getEpochNo Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testGetLatestChange_thenReturn()] replaced Integer return value with 0 for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::getEpochNo → KILLED
|
35 |
|
1.1 Location : equals Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testChangedHistoriesMaxBlockExSteps()] negated conditional → KILLED
|
36 |
|
1.1 Location : equals Killed by : none replaced boolean return with false for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::equals → NO_COVERAGE
|
38 |
|
1.1 Location : equals Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testAddedHistoriesDecentralisation()] negated conditional → KILLED
|
39 |
|
1.1 Location : equals Killed by : none replaced boolean return with true for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::equals → NO_COVERAGE
|
43 |
|
1.1 Location : equals Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testAddedHistoriesDecentralisation()] negated conditional → KILLED 2.2 Location : equals Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testAddedHistoriesDecentralisation()] negated conditional → KILLED
|
44 |
|
1.1 Location : equals Killed by : none negated conditional → NO_COVERAGE 2.2 Location : equals Killed by : none negated conditional → NO_COVERAGE 3.3 Location : equals Killed by : none replaced boolean return with true for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::equals → NO_COVERAGE
|
47 |
|
1.1 Location : equals Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testChangedHistoriesMaxBlockExSteps()] replaced boolean return with true for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::equals → KILLED 2.2 Location : equals Killed by : org.cardanofoundation.explorer.api.service.ProtocolServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.ProtocolServiceTest]/[method:testAddedHistoriesDecentralisation()] replaced boolean return with false for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::equals → KILLED
|
52 |
|
1.1 Location : hashCode Killed by : none replaced int return with 0 for org/cardanofoundation/explorer/api/model/response/protocol/ProtocolHistory::hashCode → SURVIVED
|