EffectiveSpread.java

1
package pl.zankowski.iextrading4j.api.stocks;
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.io.Serializable;
9
import java.math.BigDecimal;
10
11
public class EffectiveSpread implements Serializable {
12
13
    private static final long serialVersionUID = -7443733357554353249L;
14
15
    private final BigDecimal volume;
16
    private final String venue;
17
    private final String venueName;
18
    private final BigDecimal effectiveSpread;
19
    private final BigDecimal effectiveQuoted;
20
    private final BigDecimal priceImprovement;
21
22
    @JsonCreator
23
    public EffectiveSpread(
24
            @JsonProperty("volume") final BigDecimal volume,
25
            @JsonProperty("venue") final String venue,
26
            @JsonProperty("venueName") final String venueName,
27
            @JsonProperty("effectiveSpread") final BigDecimal effectiveSpread,
28
            @JsonProperty("effectiveQuoted") final BigDecimal effectiveQuoted,
29
            @JsonProperty("priceImprovement") BigDecimal priceImprovement) {
30
        this.volume = volume;
31
        this.venue = venue;
32
        this.venueName = venueName;
33
        this.effectiveSpread = effectiveSpread;
34
        this.effectiveQuoted = effectiveQuoted;
35
        this.priceImprovement = priceImprovement;
36
    }
37
38
    public BigDecimal getVolume() {
39 1 1. getVolume : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::getVolume → KILLED
        return volume;
40
    }
41
42
    public String getVenue() {
43 1 1. getVenue : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::getVenue → KILLED
        return venue;
44
    }
45
46
    public String getVenueName() {
47 1 1. getVenueName : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::getVenueName → KILLED
        return venueName;
48
    }
49
50
    public BigDecimal getEffectiveSpread() {
51 1 1. getEffectiveSpread : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::getEffectiveSpread → KILLED
        return effectiveSpread;
52
    }
53
54
    public BigDecimal getEffectiveQuoted() {
55 1 1. getEffectiveQuoted : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::getEffectiveQuoted → KILLED
        return effectiveQuoted;
56
    }
57
58
    public BigDecimal getPriceImprovement() {
59 1 1. getPriceImprovement : replaced return value with null for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::getPriceImprovement → KILLED
        return priceImprovement;
60
    }
61
62
    @Override
63
    public boolean equals(Object o) {
64 2 1. equals : negated conditional → KILLED
2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::equals → KILLED
        if (this == o) return true;
65 3 1. equals : negated conditional → KILLED
2. equals : negated conditional → KILLED
3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::equals → KILLED
        if (o == null || getClass() != o.getClass()) return false;
66
        EffectiveSpread that = (EffectiveSpread) o;
67 2 1. equals : negated conditional → KILLED
2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::equals → KILLED
        return Objects.equal(volume, that.volume) &&
68 1 1. equals : negated conditional → KILLED
                Objects.equal(venue, that.venue) &&
69 1 1. equals : negated conditional → KILLED
                Objects.equal(venueName, that.venueName) &&
70 1 1. equals : negated conditional → KILLED
                Objects.equal(effectiveSpread, that.effectiveSpread) &&
71 1 1. equals : negated conditional → KILLED
                Objects.equal(effectiveQuoted, that.effectiveQuoted) &&
72 1 1. equals : negated conditional → KILLED
                Objects.equal(priceImprovement, that.priceImprovement);
73
    }
74
75
    @Override
76
    public int hashCode() {
77 1 1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::hashCode → KILLED
        return Objects.hashCode(volume, venue, venueName, effectiveSpread,
78
                effectiveQuoted, priceImprovement);
79
    }
80
81
    @Override
82
    public String toString() {
83 1 1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::toString → KILLED
        return MoreObjects.toStringHelper(this)
84
                .add("volume", volume)
85
                .add("venue", venue)
86
                .add("venueName", venueName)
87
                .add("effectiveSpread", effectiveSpread)
88
                .add("effectiveQuoted", effectiveQuoted)
89
                .add("priceImprovement", priceImprovement)
90
                .toString();
91
    }
92
}

Mutations

39

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

43

1.1
Location : getVenue
Killed by : pl.zankowski.iextrading4j.api.stocks.EffectiveSpreadTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.EffectiveSpreadTest]/[method:constructor()]
replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::getVenue → KILLED

47

1.1
Location : getVenueName
Killed by : pl.zankowski.iextrading4j.api.stocks.EffectiveSpreadTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.stocks.EffectiveSpreadTest]/[method:constructor()]
replaced return value with "" for pl/zankowski/iextrading4j/api/stocks/EffectiveSpread::getVenueName → KILLED

51

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

55

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

59

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

64

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

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

65

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

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

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

67

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

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

68

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

69

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

70

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

71

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

72

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

77

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

83

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

Active mutators

Tests examined


Report generated by PIT 1.7.1