FundOwnership.java

1
package pl.zankowski.iextrading4j.api.stocks.v1;
2
3
import com.fasterxml.jackson.annotation.JsonCreator;
4
import com.fasterxml.jackson.annotation.JsonProperty;
5
import com.google.common.base.MoreObjects;
6
import com.google.common.base.Objects;
7
8
import java.math.BigDecimal;
9
import java.time.LocalDate;
10
11
public class FundOwnership extends Ownership {
12
13
    private static final long serialVersionUID = 3647818589558036777L;
14
15
    private final BigDecimal reportedMv;
16
17
    @JsonCreator
18
    public FundOwnership(
19
            @JsonProperty("symbol") final String symbol,
20
            @JsonProperty("id") final String id,
21
            @JsonProperty("adjHolding") final BigDecimal adjHolding,
22
            @JsonProperty("adjMv") final BigDecimal adjMv,
23
            @JsonProperty("entityProperName") final String entityProperName,
24
            @JsonProperty("report_date") final Long reportDate,
25
            @JsonProperty("filingDate") final LocalDate filingDate,
26
            @JsonProperty("reportedHolding") final BigDecimal reportedHolding,
27
            @JsonProperty("updated") final Long updated,
28
            @JsonProperty("date") final Long date,
29
            @JsonProperty("reportedMv") final BigDecimal reportedMv) {
30
        super(symbol, id, adjHolding, adjMv, entityProperName, reportDate, filingDate, reportedHolding, updated, date);
31
        this.reportedMv = reportedMv;
32
    }
33
34
    // TODO workaround, reported to IEX
35
    @JsonProperty("report_date")
36
    @Override
37
    public Long getReportDate() {
38 1 1. getReportDate : replaced Long return value with 0L for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::getReportDate → KILLED
        return reportDate;
39
    }
40
41
    public BigDecimal getReportedMv() {
42 1 1. getReportedMv : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::getReportedMv → KILLED
        return reportedMv;
43
    }
44
45
    @Override
46
    public boolean equals(final Object o) {
47 1 1. equals : negated conditional → KILLED
        if (this == o) {
48 1 1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::equals → KILLED
            return true;
49
        }
50 1 1. equals : negated conditional → KILLED
        if (!(o instanceof FundOwnership)) {
51 1 1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::equals → KILLED
            return false;
52
        }
53 1 1. equals : negated conditional → KILLED
        if (!super.equals(o)) {
54 1 1. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::equals → KILLED
            return false;
55
        }
56
        final FundOwnership that = (FundOwnership) o;
57 2 1. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::equals → KILLED
2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::equals → KILLED
        return Objects.equal(reportedMv, that.reportedMv);
58
    }
59
60
    @Override
61
    public int hashCode() {
62 1 1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::hashCode → KILLED
        return Objects.hashCode(super.hashCode(), reportedMv);
63
    }
64
65
    @Override
66
    public String toString() {
67 1 1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::toString → KILLED
        return MoreObjects.toStringHelper(this)
68
                .add("ownership", super.toString())
69
                .add("reportedMv", reportedMv)
70
                .toString();
71
    }
72
73
}

Mutations

38

1.1
Location : getReportDate
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:constructor()]
replaced Long return value with 0L for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::getReportDate → KILLED

42

1.1
Location : getReportedMv
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:constructor()]
replaced return value with null for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::getReportedMv → KILLED

47

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:equalsContract()]
negated conditional → KILLED

48

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:equalsContract()]
replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::equals → KILLED

50

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:equalsContract()]
negated conditional → KILLED

51

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:equalsContract()]
replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::equals → KILLED

53

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:equalsContract()]
negated conditional → KILLED

54

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:equalsContract()]
replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::equals → KILLED

57

1.1
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:equalsContract()]
replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::equals → KILLED

2.2
Location : equals
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:equalsContract()]
replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::equals → KILLED

62

1.1
Location : hashCode
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:equalsContract()]
replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::hashCode → KILLED

67

1.1
Location : toString
Killed by : pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.v1.FundOwnershipTest]/[method:toStringVerification()]
replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/v1/FundOwnership::toString → KILLED

Active mutators

Tests examined


Report generated by PIT 1.7.1