PoolDetailHeaderResponse.java

1
package org.cardanofoundation.explorer.api.model.response.pool;
2
3
import java.io.Serializable;
4
import java.math.BigDecimal;
5
import java.math.BigInteger;
6
import java.sql.Timestamp;
7
import java.util.Collections;
8
import java.util.List;
9
10
import lombok.*;
11
12
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
13
14
import org.cardanofoundation.explorer.api.common.enumeration.PoolStatus;
15
import org.cardanofoundation.explorer.api.json.serialize.PercentSerializer;
16
import org.cardanofoundation.explorer.api.model.response.pool.projection.PoolDetailUpdateProjection;
17
import org.cardanofoundation.explorer.common.entity.ledgersync.AggregatePoolInfo;
18
19
@Getter
20
@Setter
21 26 1. epochBlock : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::epochBlock → NO_COVERAGE
2. lastUpdate : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::lastUpdate → NO_COVERAGE
3. iconUrl : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::iconUrl → NO_COVERAGE
4. poolSize : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::poolSize → NO_COVERAGE
5. margin : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::margin → NO_COVERAGE
6. builder : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::builder → NO_COVERAGE
7. description : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::description → NO_COVERAGE
8. pledge : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::pledge → NO_COVERAGE
9. toString : replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::toString → NO_COVERAGE
10. homepage : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::homepage → NO_COVERAGE
11. hashView : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::hashView → NO_COVERAGE
12. stakeLimit : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::stakeLimit → NO_COVERAGE
13. lifetimeBlock : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::lifetimeBlock → NO_COVERAGE
14. totalBalanceOfPoolOwners : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::totalBalanceOfPoolOwners → NO_COVERAGE
15. delegators : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::delegators → NO_COVERAGE
16. rewardAccounts : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::rewardAccounts → NO_COVERAGE
17. createDate : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::createDate → NO_COVERAGE
18. tickerName : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::tickerName → NO_COVERAGE
19. build : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::build → NO_COVERAGE
20. logoUrl : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::logoUrl → NO_COVERAGE
21. poolView : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::poolView → NO_COVERAGE
22. poolStatus : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::poolStatus → NO_COVERAGE
23. ownerAccounts : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::ownerAccounts → NO_COVERAGE
24. saturation : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::saturation → NO_COVERAGE
25. poolName : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::poolName → NO_COVERAGE
26. cost : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::cost → NO_COVERAGE
@Builder
22
@AllArgsConstructor
23
@NoArgsConstructor
24
public class PoolDetailHeaderResponse implements Serializable {
25
26 1 1. getPoolName : replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getPoolName → KILLED
  private String poolName;
27
28 1 1. getTickerName : replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getTickerName → SURVIVED
  private String tickerName;
29
30 1 1. getPoolView : replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getPoolView → SURVIVED
  private String poolView;
31
32 1 1. getHashView : replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getHashView → SURVIVED
  private String hashView;
33
34 1 1. getCreateDate : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getCreateDate → SURVIVED
  private Timestamp createDate;
35
36 1 1. getRewardAccounts : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getRewardAccounts → SURVIVED
  private List<String> rewardAccounts;
37
38 1 1. getOwnerAccounts : replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getOwnerAccounts → KILLED
  private List<String> ownerAccounts;
39
40 1 1. getPoolSize : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getPoolSize → SURVIVED
  private BigInteger poolSize;
41
42 1 1. getStakeLimit : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getStakeLimit → SURVIVED
  private BigDecimal stakeLimit;
43
44 1 1. getDelegators : replaced Integer return value with 0 for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getDelegators → KILLED
  private Integer delegators;
45
46
  @JsonSerialize(using = PercentSerializer.class)
47 1 1. getSaturation : replaced Double return value with 0 for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getSaturation → SURVIVED
  private Double saturation;
48
49 1 1. getPledge : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getPledge → SURVIVED
  private BigInteger pledge;
50
51 1 1. getCost : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getCost → SURVIVED
  private BigInteger cost;
52
53
  @JsonSerialize(using = PercentSerializer.class)
54 1 1. getMargin : replaced Double return value with 0 for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getMargin → SURVIVED
  private Double margin;
55
56 1 1. getEpochBlock : replaced Integer return value with 0 for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getEpochBlock → SURVIVED
  private Integer epochBlock;
57
58 1 1. getLifetimeBlock : replaced Integer return value with 0 for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getLifetimeBlock → SURVIVED
  private Integer lifetimeBlock;
59
60 1 1. getHomepage : replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getHomepage → SURVIVED
  private String homepage;
61
62 1 1. getDescription : replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getDescription → SURVIVED
  private String description;
63
64 1 1. getLogoUrl : replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getLogoUrl → SURVIVED
  private String logoUrl;
65
66 1 1. getIconUrl : replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getIconUrl → SURVIVED
  private String iconUrl;
67
68 1 1. getTotalBalanceOfPoolOwners : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getTotalBalanceOfPoolOwners → SURVIVED
  private BigInteger totalBalanceOfPoolOwners;
69
70 1 1. getLastUpdate : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getLastUpdate → SURVIVED
  private Timestamp lastUpdate;
71 1 1. getPoolStatus : replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getPoolStatus → KILLED
  private PoolStatus poolStatus;
72
73
  public PoolDetailHeaderResponse(
74
      PoolDetailUpdateProjection poolDetail, AggregatePoolInfo aggregatePoolInfo) {
75
    this.poolName = poolDetail.getPoolName();
76
    this.tickerName = poolDetail.getTickerName();
77
    this.poolView = poolDetail.getPoolView();
78
    this.hashView = poolDetail.getHashRaw();
79
    this.pledge = poolDetail.getPledge();
80
    this.cost = poolDetail.getCost();
81
    this.margin = poolDetail.getMargin();
82
    this.epochBlock = aggregatePoolInfo.getBlockInEpoch();
83
    this.lifetimeBlock = aggregatePoolInfo.getBlockLifeTime();
84
    this.delegators = aggregatePoolInfo.getDelegatorCount();
85
    this.lastUpdate = poolDetail.getLastUpdate();
86
    this.rewardAccounts = Collections.singletonList(poolDetail.getRewardAddress());
87
    this.logoUrl = poolDetail.getLogoUrl();
88
    this.iconUrl = poolDetail.getIconUrl();
89
  }
90
}

Mutations

21

1.1
Location : epochBlock
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::epochBlock → NO_COVERAGE

2.2
Location : lastUpdate
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::lastUpdate → NO_COVERAGE

3.3
Location : iconUrl
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::iconUrl → NO_COVERAGE

4.4
Location : poolSize
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::poolSize → NO_COVERAGE

5.5
Location : margin
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::margin → NO_COVERAGE

6.6
Location : builder
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::builder → NO_COVERAGE

7.7
Location : description
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::description → NO_COVERAGE

8.8
Location : pledge
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::pledge → NO_COVERAGE

9.9
Location : toString
Killed by : none
replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::toString → NO_COVERAGE

10.10
Location : homepage
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::homepage → NO_COVERAGE

11.11
Location : hashView
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::hashView → NO_COVERAGE

12.12
Location : stakeLimit
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::stakeLimit → NO_COVERAGE

13.13
Location : lifetimeBlock
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::lifetimeBlock → NO_COVERAGE

14.14
Location : totalBalanceOfPoolOwners
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::totalBalanceOfPoolOwners → NO_COVERAGE

15.15
Location : delegators
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::delegators → NO_COVERAGE

16.16
Location : rewardAccounts
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::rewardAccounts → NO_COVERAGE

17.17
Location : createDate
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::createDate → NO_COVERAGE

18.18
Location : tickerName
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::tickerName → NO_COVERAGE

19.19
Location : build
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::build → NO_COVERAGE

20.20
Location : logoUrl
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::logoUrl → NO_COVERAGE

21.21
Location : poolView
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::poolView → NO_COVERAGE

22.22
Location : poolStatus
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::poolStatus → NO_COVERAGE

23.23
Location : ownerAccounts
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::ownerAccounts → NO_COVERAGE

24.24
Location : saturation
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::saturation → NO_COVERAGE

25.25
Location : poolName
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::poolName → NO_COVERAGE

26.26
Location : cost
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse$PoolDetailHeaderResponseBuilder::cost → NO_COVERAGE

26

1.1
Location : getPoolName
Killed by : org.cardanofoundation.explorer.api.service.DelegationServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.DelegationServiceTest]/[method:testGetDataForPoolDetail_useKoios_thenReturn()]
replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getPoolName → KILLED

28

1.1
Location : getTickerName
Killed by : none
replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getTickerName → SURVIVED

30

1.1
Location : getPoolView
Killed by : none
replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getPoolView → SURVIVED

32

1.1
Location : getHashView
Killed by : none
replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getHashView → SURVIVED

34

1.1
Location : getCreateDate
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getCreateDate → SURVIVED

36

1.1
Location : getRewardAccounts
Killed by : none
replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getRewardAccounts → SURVIVED

38

1.1
Location : getOwnerAccounts
Killed by : org.cardanofoundation.explorer.api.service.DelegationServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.DelegationServiceTest]/[method:testGetDataForPoolDetail_useKoios_thenReturn()]
replaced return value with Collections.emptyList for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getOwnerAccounts → KILLED

40

1.1
Location : getPoolSize
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getPoolSize → SURVIVED

42

1.1
Location : getStakeLimit
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getStakeLimit → SURVIVED

44

1.1
Location : getDelegators
Killed by : org.cardanofoundation.explorer.api.service.DelegationServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.DelegationServiceTest]/[method:testGetDataForPoolDetail_notUseKoios_thenReturn()]
replaced Integer return value with 0 for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getDelegators → KILLED

47

1.1
Location : getSaturation
Killed by : none
replaced Double return value with 0 for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getSaturation → SURVIVED

49

1.1
Location : getPledge
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getPledge → SURVIVED

51

1.1
Location : getCost
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getCost → SURVIVED

54

1.1
Location : getMargin
Killed by : none
replaced Double return value with 0 for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getMargin → SURVIVED

56

1.1
Location : getEpochBlock
Killed by : none
replaced Integer return value with 0 for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getEpochBlock → SURVIVED

58

1.1
Location : getLifetimeBlock
Killed by : none
replaced Integer return value with 0 for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getLifetimeBlock → SURVIVED

60

1.1
Location : getHomepage
Killed by : none
replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getHomepage → SURVIVED

62

1.1
Location : getDescription
Killed by : none
replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getDescription → SURVIVED

64

1.1
Location : getLogoUrl
Killed by : none
replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getLogoUrl → SURVIVED

66

1.1
Location : getIconUrl
Killed by : none
replaced return value with "" for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getIconUrl → SURVIVED

68

1.1
Location : getTotalBalanceOfPoolOwners
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getTotalBalanceOfPoolOwners → SURVIVED

70

1.1
Location : getLastUpdate
Killed by : none
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getLastUpdate → SURVIVED

71

1.1
Location : getPoolStatus
Killed by : org.cardanofoundation.explorer.api.service.DelegationServiceTest.[engine:junit-jupiter]/[class:org.cardanofoundation.explorer.api.service.DelegationServiceTest]/[method:testGetDataForPoolDetail_useKoios_thenReturn()]
replaced return value with null for org/cardanofoundation/explorer/api/model/response/pool/PoolDetailHeaderResponse::getPoolStatus → KILLED

Active mutators

Tests examined


Report generated by PIT 1.14.2