SubmitSmAdapter.java

1
package fr.sii.ogham.testing.sms.simulator.jsmpp;
2
3
import static java.util.stream.Collectors.toList;
4
5
import java.util.List;
6
import java.util.stream.Stream;
7
8
import fr.sii.ogham.testing.sms.simulator.bean.Address;
9
import fr.sii.ogham.testing.sms.simulator.bean.Command;
10
import fr.sii.ogham.testing.sms.simulator.bean.OptionalParameter;
11
import fr.sii.ogham.testing.sms.simulator.bean.SimpleAddress;
12
import fr.sii.ogham.testing.sms.simulator.bean.SimpleCommand;
13
import fr.sii.ogham.testing.sms.simulator.bean.SubmitSm;
14
import fr.sii.ogham.testing.sms.simulator.bean.Tag;
15
16
/**
17
 * Adapts JSMPP {@link org.jsmpp.bean.SubmitSm} into {@link SubmitSm}
18
 * abstraction.
19
 * 
20
 * @author Aurélien Baudet
21
 *
22
 */
23
public class SubmitSmAdapter implements SubmitSm {
24
	protected final org.jsmpp.bean.SubmitSm original;
25
26
	/**
27
	 * @param original
28
	 *            the JSMPP {@link org.jsmpp.bean.SubmitSm} to adapt
29
	 */
30
	public SubmitSmAdapter(org.jsmpp.bean.SubmitSm original) {
31
		super();
32
		this.original = original;
33
	}
34
35
	@Override
36
	public Command getCommand() {
37 1 1. getCommand : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getCommand → NO_COVERAGE
		return new SimpleCommand(original.getCommandLength(), original.getCommandId(), original.getCommandStatus(), original.getSequenceNumber());
38
	}
39
40
	@Override
41
	public String getServiceType() {
42 1 1. getServiceType : replaced return value with "" for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getServiceType → NO_COVERAGE
		return original.getServiceType();
43
	}
44
45
	@Override
46
	public Address getSourceAddress() {
47 4 1. getSourceAddress : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getSourceAddress → NO_COVERAGE
2. getSourceAddress : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getSourceAddress → KILLED
3. getSourceAddress : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getSourceAddress → KILLED
4. getSourceAddress : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getSourceAddress → KILLED
		return new SimpleAddress(original.getSourceAddr(), original.getSourceAddrTon(), original.getSourceAddrNpi());
48
	}
49
50
	@Override
51
	public Address getDestAddress() {
52 4 1. getDestAddress : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDestAddress → NO_COVERAGE
2. getDestAddress : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDestAddress → KILLED
3. getDestAddress : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDestAddress → KILLED
4. getDestAddress : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDestAddress → KILLED
		return new SimpleAddress(original.getDestAddress(), original.getDestAddrTon(), original.getDestAddrNpi());
53
	}
54
55
	@Override
56
	public byte getEsmClass() {
57 1 1. getEsmClass : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getEsmClass → NO_COVERAGE
		return original.getEsmClass();
58
	}
59
60
	@Override
61
	public byte getRegisteredDelivery() {
62 1 1. getRegisteredDelivery : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getRegisteredDelivery → NO_COVERAGE
		return original.getRegisteredDelivery();
63
	}
64
65
	@Override
66
	public byte getDataCoding() {
67 5 1. getDataCoding : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDataCoding → NO_COVERAGE
2. getDataCoding : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDataCoding → TIMED_OUT
3. getDataCoding : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDataCoding → KILLED
4. getDataCoding : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDataCoding → KILLED
5. getDataCoding : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDataCoding → KILLED
		return original.getDataCoding();
68
	}
69
70
	@Override
71
	public byte[] getShortMessage() {
72 5 1. getShortMessage : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessage → NO_COVERAGE
2. getShortMessage : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessage → TIMED_OUT
3. getShortMessage : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessage → KILLED
4. getShortMessage : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessage → KILLED
5. getShortMessage : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessage → KILLED
		return original.getShortMessage();
73
	}
74
75
	@Override
76
	public int getShortMessageLength() {
77 1 1. getShortMessageLength : replaced int return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessageLength → NO_COVERAGE
		return original.getShortMessage().length;
78
	}
79
80
	@Override
81
	public OptionalParameter getOptionalParameter(Tag tag) {
82 3 1. getOptionalParameter : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getOptionalParameter → NO_COVERAGE
2. getOptionalParameter : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getOptionalParameter → KILLED
3. getOptionalParameter : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getOptionalParameter → KILLED
		return new OptionalParameterAdapter(original, tag.getCode());
83
	}
84
85
	@Override
86
	public List<OptionalParameter> getOptionalParameters() {
87 2 1. getOptionalParameters : replaced return value with Collections.emptyList for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getOptionalParameters → NO_COVERAGE
2. lambda$getOptionalParameters$0 : replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::lambda$getOptionalParameters$0 → NO_COVERAGE
		return Stream.of(original.getOptionalParameters()).map(p -> new OptionalParameterAdapter(original, p.tag)).collect(toList());
88
	}
89
90
	@Override
91
	public byte getPriorityFlag() {
92 1 1. getPriorityFlag : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getPriorityFlag → NO_COVERAGE
		return original.getPriorityFlag();
93
	}
94
95
	@Override
96
	public byte getProtocolId() {
97 1 1. getProtocolId : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getProtocolId → NO_COVERAGE
		return original.getProtocolId();
98
	}
99
100
	@Override
101
	public byte getReplaceIfPresentFlag() {
102 1 1. getReplaceIfPresentFlag : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getReplaceIfPresentFlag → NO_COVERAGE
		return original.getReplaceIfPresent();
103
	}
104
105
	@Override
106
	public String getScheduleDeliveryTime() {
107 1 1. getScheduleDeliveryTime : replaced return value with "" for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getScheduleDeliveryTime → NO_COVERAGE
		return original.getScheduleDeliveryTime();
108
	}
109
110
	@Override
111
	public byte getSmDefaultMsgId() {
112 1 1. getSmDefaultMsgId : replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getSmDefaultMsgId → NO_COVERAGE
		return original.getSmDefaultMsgId();
113
	}
114
115
	@Override
116
	public String getValidityPeriod() {
117 1 1. getValidityPeriod : replaced return value with "" for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getValidityPeriod → NO_COVERAGE
		return original.getValidityPeriod();
118
	}
119
120
	@Override
121
	public boolean isUdhi() {
122 10 1. isUdhi : replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → NO_COVERAGE
2. isUdhi : replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → NO_COVERAGE
3. isUdhi : replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → TIMED_OUT
4. isUdhi : replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → TIMED_OUT
5. isUdhi : replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED
6. isUdhi : replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED
7. isUdhi : replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED
8. isUdhi : replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED
9. isUdhi : replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED
10. isUdhi : replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED
		return original.isUdhi();
123
	}
124
125
}

Mutations

37

1.1
Location : getCommand
Killed by : none
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getCommand → NO_COVERAGE

42

1.1
Location : getServiceType
Killed by : none
replaced return value with "" for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getServiceType → NO_COVERAGE

47

1.1
Location : getSourceAddress
Killed by : oghamall.it.sms.SmsSMPPGsm7bitTest.longMessage(oghamall.it.sms.SmsSMPPGsm7bitTest)
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getSourceAddress → KILLED

2.2
Location : getSourceAddress
Killed by : none
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getSourceAddress → NO_COVERAGE

3.3
Location : getSourceAddress
Killed by : oghamcloudhopper.it.PartialConfigurationTest.nothingConfiguredAndLongMessageShouldSendOneLongMessageUsingDefaultEncoding(oghamcloudhopper.it.PartialConfigurationTest)
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getSourceAddress → KILLED

4.4
Location : getSourceAddress
Killed by : oghamtesting.it.assertion.FluentSmsAssertionsSpec
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getSourceAddress → KILLED

52

1.1
Location : getDestAddress
Killed by : oghamtesting.it.assertion.FluentSmsAssertionsSpec
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDestAddress → KILLED

2.2
Location : getDestAddress
Killed by : none
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDestAddress → NO_COVERAGE

3.3
Location : getDestAddress
Killed by : oghamcloudhopper.it.PartialConfigurationTest.nothingConfiguredAndLongMessageShouldSendOneLongMessageUsingDefaultEncoding(oghamcloudhopper.it.PartialConfigurationTest)
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDestAddress → KILLED

4.4
Location : getDestAddress
Killed by : oghamall.it.sms.SmsSMPPGsm7bitTest.longMessage(oghamall.it.sms.SmsSMPPGsm7bitTest)
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDestAddress → KILLED

57

1.1
Location : getEsmClass
Killed by : none
replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getEsmClass → NO_COVERAGE

62

1.1
Location : getRegisteredDelivery
Killed by : none
replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getRegisteredDelivery → NO_COVERAGE

67

1.1
Location : getDataCoding
Killed by : none
replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDataCoding → TIMED_OUT

2.2
Location : getDataCoding
Killed by : oghamtesting.it.assertion.FluentSmsAssertionsSpec
replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDataCoding → KILLED

3.3
Location : getDataCoding
Killed by : none
replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDataCoding → NO_COVERAGE

4.4
Location : getDataCoding
Killed by : oghamcloudhopper.it.PartialConfigurationTest.nothingConfiguredAndLongMessageShouldSendOneLongMessageUsingDefaultEncoding(oghamcloudhopper.it.PartialConfigurationTest)
replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDataCoding → KILLED

5.5
Location : getDataCoding
Killed by : oghamall.it.sms.SmsSMPPDefaultsTest.gsm8bitDefaultAlphabet(oghamall.it.sms.SmsSMPPDefaultsTest)
replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getDataCoding → KILLED

72

1.1
Location : getShortMessage
Killed by : none
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessage → NO_COVERAGE

2.2
Location : getShortMessage
Killed by : none
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessage → TIMED_OUT

3.3
Location : getShortMessage
Killed by : oghamtesting.it.assertion.FluentSmsAssertionsSpec
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessage → KILLED

4.4
Location : getShortMessage
Killed by : oghamall.it.sms.SmsSMPPGsm7bitTest.longMessage(oghamall.it.sms.SmsSMPPGsm7bitTest)
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessage → KILLED

5.5
Location : getShortMessage
Killed by : oghamcloudhopper.it.PartialConfigurationTest.nothingConfiguredAndLongMessageShouldSendOneLongMessageUsingDefaultEncoding(oghamcloudhopper.it.PartialConfigurationTest)
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessage → KILLED

77

1.1
Location : getShortMessageLength
Killed by : none
replaced int return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getShortMessageLength → NO_COVERAGE

82

1.1
Location : getOptionalParameter
Killed by : oghamcloudhopper.it.TlvMessagePayloadTest.simple(oghamcloudhopper.it.TlvMessagePayloadTest)
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getOptionalParameter → KILLED

2.2
Location : getOptionalParameter
Killed by : oghamtesting.it.assertion.FluentSmsAssertionsSpec
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getOptionalParameter → KILLED

3.3
Location : getOptionalParameter
Killed by : none
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getOptionalParameter → NO_COVERAGE

87

1.1
Location : getOptionalParameters
Killed by : none
replaced return value with Collections.emptyList for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getOptionalParameters → NO_COVERAGE

2.2
Location : lambda$getOptionalParameters$0
Killed by : none
replaced return value with null for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::lambda$getOptionalParameters$0 → NO_COVERAGE

92

1.1
Location : getPriorityFlag
Killed by : none
replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getPriorityFlag → NO_COVERAGE

97

1.1
Location : getProtocolId
Killed by : none
replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getProtocolId → NO_COVERAGE

102

1.1
Location : getReplaceIfPresentFlag
Killed by : none
replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getReplaceIfPresentFlag → NO_COVERAGE

107

1.1
Location : getScheduleDeliveryTime
Killed by : none
replaced return value with "" for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getScheduleDeliveryTime → NO_COVERAGE

112

1.1
Location : getSmDefaultMsgId
Killed by : none
replaced byte return with 0 for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getSmDefaultMsgId → NO_COVERAGE

117

1.1
Location : getValidityPeriod
Killed by : none
replaced return value with "" for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::getValidityPeriod → NO_COVERAGE

122

1.1
Location : isUdhi
Killed by : oghamall.it.sms.SmsSMPPGsm7bitTest.longMessage(oghamall.it.sms.SmsSMPPGsm7bitTest)
replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED

2.2
Location : isUdhi
Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledAndAutoGuessEnabledAndGsm7bitEncodingConfiguredAndLongMessageShouldSendTwoMessages(oghamcloudhopper.it.PartialConfigurationTest)
replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED

3.3
Location : isUdhi
Killed by : oghamtesting.it.assertion.FluentSmsAssertionsSpec
replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED

4.4
Location : isUdhi
Killed by : none
replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → NO_COVERAGE

5.5
Location : isUdhi
Killed by : none
replaced boolean return with false for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → TIMED_OUT

6.6
Location : isUdhi
Killed by : oghamtesting.it.assertion.FluentSmsAssertionsSpec
replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED

7.7
Location : isUdhi
Killed by : oghamall.it.sms.SmsSMPPDefaultsTest.gsm8bitDefaultAlphabet(oghamall.it.sms.SmsSMPPDefaultsTest)
replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED

8.8
Location : isUdhi
Killed by : oghamcloudhopper.it.PartialConfigurationTest.nothingConfiguredAndLongMessageShouldSendOneLongMessageUsingDefaultEncoding(oghamcloudhopper.it.PartialConfigurationTest)
replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → KILLED

9.9
Location : isUdhi
Killed by : none
replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → NO_COVERAGE

10.10
Location : isUdhi
Killed by : none
replaced boolean return with true for fr/sii/ogham/testing/sms/simulator/jsmpp/SubmitSmAdapter::isUdhi → TIMED_OUT

Active mutators

Tests examined


Report generated by PIT OGHAM