SystemStatus.java

1
package pl.zankowski.iextrading4j.api.system;
2
3
import com.fasterxml.jackson.annotation.JsonCreator;
4
import com.fasterxml.jackson.annotation.JsonProperty;
5
6
import java.io.Serializable;
7
import java.math.BigDecimal;
8
import java.util.Objects;
9
import java.util.StringJoiner;
10
11
public class SystemStatus implements Serializable {
12
13
    private static final long serialVersionUID = 3320852096256614294L;
14
15
    private final String status;
16
    private final String version;
17
    private final Long time;
18
    private final BigDecimal currentMonthAPICalls;
19
20
    @JsonCreator
21
    public SystemStatus(
22
            @JsonProperty("status") final String status,
23
            @JsonProperty("version") final String version,
24
            @JsonProperty("time") final Long time,
25
            @JsonProperty("currentMonthAPICalls") final BigDecimal currentMonthAPICalls) {
26
        this.status = status;
27
        this.version = version;
28
        this.time = time;
29
        this.currentMonthAPICalls = currentMonthAPICalls;
30
    }
31
32
    public String getStatus() {
33 1 1. getStatus : replaced return value with "" for pl/zankowski/iextrading4j/api/system/SystemStatus::getStatus → KILLED
        return status;
34
    }
35
36
    public String getVersion() {
37 1 1. getVersion : replaced return value with "" for pl/zankowski/iextrading4j/api/system/SystemStatus::getVersion → KILLED
        return version;
38
    }
39
40
    public Long getTime() {
41 1 1. getTime : replaced Long return value with 0L for pl/zankowski/iextrading4j/api/system/SystemStatus::getTime → KILLED
        return time;
42
    }
43
44
    public BigDecimal getCurrentMonthAPICalls() {
45 1 1. getCurrentMonthAPICalls : replaced return value with null for pl/zankowski/iextrading4j/api/system/SystemStatus::getCurrentMonthAPICalls → SURVIVED
        return currentMonthAPICalls;
46
    }
47
48
    @Override
49
    public boolean equals(Object o) {
50 2 1. equals : negated conditional → KILLED
2. equals : replaced boolean return with false for pl/zankowski/iextrading4j/api/system/SystemStatus::equals → KILLED
        if (this == o) return true;
51 3 1. equals : negated conditional → KILLED
2. equals : negated conditional → KILLED
3. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/system/SystemStatus::equals → KILLED
        if (o == null || getClass() != o.getClass()) return false;
52
        SystemStatus that = (SystemStatus) o;
53 2 1. equals : negated conditional → KILLED
2. equals : replaced boolean return with true for pl/zankowski/iextrading4j/api/system/SystemStatus::equals → KILLED
        return Objects.equals(status, that.status) &&
54 1 1. equals : negated conditional → KILLED
                Objects.equals(version, that.version) &&
55 1 1. equals : negated conditional → KILLED
                Objects.equals(time, that.time) &&
56 1 1. equals : negated conditional → KILLED
                Objects.equals(currentMonthAPICalls, that.currentMonthAPICalls);
57
    }
58
59
    @Override
60
    public int hashCode() {
61 1 1. hashCode : replaced int return with 0 for pl/zankowski/iextrading4j/api/system/SystemStatus::hashCode → KILLED
        return Objects.hash(status, version, time, currentMonthAPICalls);
62
    }
63
64
    @Override
65
    public String toString() {
66 1 1. toString : replaced return value with "" for pl/zankowski/iextrading4j/api/system/SystemStatus::toString → KILLED
        return new StringJoiner(", ", SystemStatus.class.getSimpleName() + "[", "]")
67
                .add("status='" + status + "'")
68
                .add("version='" + version + "'")
69
                .add("time=" + time)
70
                .add("currentMonthAPICalls=" + currentMonthAPICalls)
71
                .toString();
72
    }
73
}

Mutations

33

1.1
Location : getStatus
Killed by : pl.zankowski.iextrading4j.api.system.SystemStatusTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.system.SystemStatusTest]/[method:constructor()]
replaced return value with "" for pl/zankowski/iextrading4j/api/system/SystemStatus::getStatus → KILLED

37

1.1
Location : getVersion
Killed by : pl.zankowski.iextrading4j.api.system.SystemStatusTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.system.SystemStatusTest]/[method:constructor()]
replaced return value with "" for pl/zankowski/iextrading4j/api/system/SystemStatus::getVersion → KILLED

41

1.1
Location : getTime
Killed by : pl.zankowski.iextrading4j.api.system.SystemStatusTest.[engine:junit-jupiter]/[class:pl.zankowski.iextrading4j.api.system.SystemStatusTest]/[method:constructor()]
replaced Long return value with 0L for pl/zankowski/iextrading4j/api/system/SystemStatus::getTime → KILLED

45

1.1
Location : getCurrentMonthAPICalls
Killed by : none
replaced return value with null for pl/zankowski/iextrading4j/api/system/SystemStatus::getCurrentMonthAPICalls → SURVIVED

50

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

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

51

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

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

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

53

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

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

54

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

55

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

56

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

61

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

66

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

Active mutators

Tests examined


Report generated by PIT 1.7.1