DefaultPortFinder.java

1
package fr.sii.ogham.testing.util.port;
2
3
import java.util.Random;
4
import java.util.SortedSet;
5
import java.util.TreeSet;
6
import java.util.function.IntPredicate;
7
8
import fr.sii.ogham.testing.util.RandomPortUtils;
9
10
/**
11
 * Default implementation that search for ports by delegating port availability
12
 * check to a function.
13
 * 
14
 * @author Aurélien Baudet
15
 *
16
 */
17
public class DefaultPortFinder implements PortFinder {
18
	protected final Random random;
19
	protected final String protocol;
20
	protected final IntPredicate isPortAvailable;
21
22
	/**
23
	 * Initialize with a function to check if a port is available or not.
24
	 * 
25
	 * @param protocol
26
	 *            the protocol
27
	 * @param isPortAvailable
28
	 *            Determine if the specified port for this {@code SocketType} is
29
	 *            currently available on {@code localhost}.
30
	 */
31
	@SuppressWarnings("java:S2245")
32
	public DefaultPortFinder(String protocol, IntPredicate isPortAvailable) {
33
		this(protocol, isPortAvailable, new Random(System.nanoTime()));
34
	}
35
36
	/**
37
	 * Initialize with a function to check if a port is available or not.
38
	 * 
39
	 * @param protocol
40
	 *            the protocol
41
	 * @param isPortAvailable
42
	 *            Determine if the specified port for this {@code SocketType} is
43
	 *            currently available on {@code localhost}.
44
	 * @param random
45
	 *            the random implementation to use
46
	 */
47
	public DefaultPortFinder(String protocol, IntPredicate isPortAvailable, Random random) {
48
		super();
49
		this.protocol = protocol;
50
		this.isPortAvailable = isPortAvailable;
51
		this.random = random;
52
	}
53
54
	/**
55
	 * Find an available port for this {@code SocketType}, randomly selected
56
	 * from the range [{@code minPort}, {@code maxPort}].
57
	 * 
58
	 * @param minPort
59
	 *            the minimum port number
60
	 * @param maxPort
61
	 *            the maximum port number
62
	 * @return an available port number for this socket type
63
	 * @throws IllegalStateException
64
	 *             if no available port could be found
65
	 */
66
	public int findAvailablePort(int minPort, int maxPort) {
67 14 1. findAvailablePort : changed conditional boundary → SURVIVED
2. findAvailablePort : changed conditional boundary → NO_COVERAGE
3. findAvailablePort : negated conditional → NO_COVERAGE
4. findAvailablePort : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE
5. findAvailablePort : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED
6. findAvailablePort : changed conditional boundary → TIMED_OUT
7. findAvailablePort : negated conditional → KILLED
8. findAvailablePort : negated conditional → KILLED
9. findAvailablePort : negated conditional → KILLED
10. findAvailablePort : negated conditional → KILLED
11. findAvailablePort : negated conditional → KILLED
12. findAvailablePort : negated conditional → KILLED
13. findAvailablePort : negated conditional → KILLED
14. findAvailablePort : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → KILLED
		assertIsTrue(minPort > 0, "'minPort' must be greater than 0");
68 13 1. findAvailablePort : changed conditional boundary → SURVIVED
2. findAvailablePort : changed conditional boundary → NO_COVERAGE
3. findAvailablePort : negated conditional → NO_COVERAGE
4. findAvailablePort : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE
5. findAvailablePort : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED
6. findAvailablePort : negated conditional → KILLED
7. findAvailablePort : negated conditional → KILLED
8. findAvailablePort : negated conditional → KILLED
9. findAvailablePort : negated conditional → KILLED
10. findAvailablePort : negated conditional → KILLED
11. findAvailablePort : negated conditional → KILLED
12. findAvailablePort : negated conditional → KILLED
13. findAvailablePort : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → KILLED
		assertIsTrue(maxPort >= minPort, "'maxPort' must be greater than or equal to 'minPort'");
69 19 1. findAvailablePort : changed conditional boundary → NO_COVERAGE
2. findAvailablePort : negated conditional → NO_COVERAGE
3. findAvailablePort : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED
4. findAvailablePort : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE
5. findAvailablePort : changed conditional boundary → KILLED
6. findAvailablePort : changed conditional boundary → KILLED
7. findAvailablePort : changed conditional boundary → KILLED
8. findAvailablePort : changed conditional boundary → KILLED
9. findAvailablePort : changed conditional boundary → KILLED
10. findAvailablePort : changed conditional boundary → KILLED
11. findAvailablePort : changed conditional boundary → KILLED
12. findAvailablePort : negated conditional → KILLED
13. findAvailablePort : negated conditional → KILLED
14. findAvailablePort : negated conditional → KILLED
15. findAvailablePort : negated conditional → KILLED
16. findAvailablePort : negated conditional → KILLED
17. findAvailablePort : negated conditional → KILLED
18. findAvailablePort : negated conditional → KILLED
19. findAvailablePort : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → KILLED
		assertIsTrue(maxPort <= RandomPortUtils.PORT_RANGE_MAX, "'maxPort' must be less than or equal to " + RandomPortUtils.PORT_RANGE_MAX);
70
71 3 1. findAvailablePort : Replaced integer subtraction with addition → NO_COVERAGE
2. findAvailablePort : Replaced integer subtraction with addition → SURVIVED
3. findAvailablePort : Replaced integer subtraction with addition → KILLED
		int portRange = maxPort - minPort;
72
		int candidatePort;
73
		int searchCounter = 0;
74
		do {
75 11 1. findAvailablePort : changed conditional boundary → NO_COVERAGE
2. findAvailablePort : changed conditional boundary → SURVIVED
3. findAvailablePort : negated conditional → NO_COVERAGE
4. findAvailablePort : changed conditional boundary → KILLED
5. findAvailablePort : negated conditional → KILLED
6. findAvailablePort : negated conditional → KILLED
7. findAvailablePort : negated conditional → KILLED
8. findAvailablePort : negated conditional → KILLED
9. findAvailablePort : negated conditional → KILLED
10. findAvailablePort : negated conditional → KILLED
11. findAvailablePort : negated conditional → KILLED
			if (searchCounter > portRange) {
76
				throw new IllegalStateException(String.format("Could not find an available %s port in the range [%d, %d] after %d attempts", protocol, minPort, maxPort, searchCounter));
77
			}
78
			candidatePort = findRandomPort(minPort, maxPort);
79 3 1. findAvailablePort : Changed increment from 1 to -1 → SURVIVED
2. findAvailablePort : Changed increment from 1 to -1 → NO_COVERAGE
3. findAvailablePort : Changed increment from 1 to -1 → TIMED_OUT
			searchCounter++;
80 8 1. findAvailablePort : negated conditional → NO_COVERAGE
2. findAvailablePort : negated conditional → KILLED
3. findAvailablePort : negated conditional → KILLED
4. findAvailablePort : negated conditional → KILLED
5. findAvailablePort : negated conditional → KILLED
6. findAvailablePort : negated conditional → KILLED
7. findAvailablePort : negated conditional → KILLED
8. findAvailablePort : negated conditional → KILLED
		} while (!isPortAvailable.test(candidatePort));
81
82 7 1. findAvailablePort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → SURVIVED
2. findAvailablePort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → NO_COVERAGE
3. findAvailablePort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → KILLED
4. findAvailablePort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → KILLED
5. findAvailablePort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → KILLED
6. findAvailablePort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → KILLED
7. findAvailablePort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → KILLED
		return candidatePort;
83
	}
84
85
	/**
86
	 * Find the requested number of available ports for this {@code SocketType},
87
	 * each randomly selected from the range [{@code minPort}, {@code maxPort}].
88
	 * 
89
	 * @param numRequested
90
	 *            the number of available ports to find
91
	 * @param minPort
92
	 *            the minimum port number
93
	 * @param maxPort
94
	 *            the maximum port number
95
	 * @return a sorted set of available port numbers for this socket type
96
	 * @throws IllegalStateException
97
	 *             if the requested number of available ports could not be found
98
	 */
99
	public SortedSet<Integer> findAvailablePorts(int numRequested, int minPort, int maxPort) {
100 6 1. findAvailablePorts : changed conditional boundary → NO_COVERAGE
2. findAvailablePorts : changed conditional boundary → SURVIVED
3. findAvailablePorts : negated conditional → NO_COVERAGE
4. findAvailablePorts : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED
5. findAvailablePorts : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE
6. findAvailablePorts : negated conditional → KILLED
		assertIsTrue(minPort > 0, "'minPort' must be greater than 0");
101 6 1. findAvailablePorts : changed conditional boundary → NO_COVERAGE
2. findAvailablePorts : changed conditional boundary → SURVIVED
3. findAvailablePorts : negated conditional → NO_COVERAGE
4. findAvailablePorts : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE
5. findAvailablePorts : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED
6. findAvailablePorts : negated conditional → KILLED
		assertIsTrue(maxPort > minPort, "'maxPort' must be greater than 'minPort'");
102 6 1. findAvailablePorts : changed conditional boundary → NO_COVERAGE
2. findAvailablePorts : negated conditional → NO_COVERAGE
3. findAvailablePorts : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE
4. findAvailablePorts : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED
5. findAvailablePorts : changed conditional boundary → KILLED
6. findAvailablePorts : negated conditional → KILLED
		assertIsTrue(maxPort <= RandomPortUtils.PORT_RANGE_MAX, "'maxPort' must be less than or equal to " + RandomPortUtils.PORT_RANGE_MAX);
103 6 1. findAvailablePorts : changed conditional boundary → NO_COVERAGE
2. findAvailablePorts : negated conditional → NO_COVERAGE
3. findAvailablePorts : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE
4. findAvailablePorts : changed conditional boundary → KILLED
5. findAvailablePorts : negated conditional → KILLED
6. findAvailablePorts : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → KILLED
		assertIsTrue(numRequested > 0, "'numRequested' must be greater than 0");
104 8 1. findAvailablePorts : changed conditional boundary → SURVIVED
2. findAvailablePorts : changed conditional boundary → NO_COVERAGE
3. findAvailablePorts : Replaced integer subtraction with addition → NO_COVERAGE
4. findAvailablePorts : negated conditional → NO_COVERAGE
5. findAvailablePorts : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE
6. findAvailablePorts : Replaced integer subtraction with addition → KILLED
7. findAvailablePorts : negated conditional → KILLED
8. findAvailablePorts : removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → KILLED
		assertIsTrue((maxPort - minPort) >= numRequested, "'numRequested' must not be greater than 'maxPort' - 'minPort'");
105
106
		SortedSet<Integer> availablePorts = new TreeSet<>();
107
		int attemptCount = 0;
108 12 1. findAvailablePorts : changed conditional boundary → NO_COVERAGE
2. findAvailablePorts : changed conditional boundary → SURVIVED
3. findAvailablePorts : changed conditional boundary → NO_COVERAGE
4. findAvailablePorts : Changed increment from 1 to -1 → SURVIVED
5. findAvailablePorts : Changed increment from 1 to -1 → NO_COVERAGE
6. findAvailablePorts : Replaced integer addition with subtraction → NO_COVERAGE
7. findAvailablePorts : negated conditional → NO_COVERAGE
8. findAvailablePorts : negated conditional → NO_COVERAGE
9. findAvailablePorts : changed conditional boundary → KILLED
10. findAvailablePorts : Replaced integer addition with subtraction → KILLED
11. findAvailablePorts : negated conditional → KILLED
12. findAvailablePorts : negated conditional → KILLED
		while ((++attemptCount <= numRequested + 100) && availablePorts.size() < numRequested) {
109
			availablePorts.add(findAvailablePort(minPort, maxPort));
110
		}
111
112 2 1. findAvailablePorts : negated conditional → NO_COVERAGE
2. findAvailablePorts : negated conditional → KILLED
		if (availablePorts.size() != numRequested) {
113
			throw new IllegalStateException(String.format("Could not find %d available %s ports in the range [%d, %d]", numRequested, protocol, minPort, maxPort));
114
		}
115
116 2 1. findAvailablePorts : replaced return value with null for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePorts → NO_COVERAGE
2. findAvailablePorts : replaced return value with null for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePorts → KILLED
		return availablePorts;
117
	}
118
	
119
	/**
120
	 * Find a pseudo-random port number within the range [{@code minPort},
121
	 * {@code maxPort}].
122
	 * 
123
	 * @param minPort
124
	 *            the minimum port number
125
	 * @param maxPort
126
	 *            the maximum port number
127
	 * @return a random port number within the specified range
128
	 */
129
	private int findRandomPort(int minPort, int maxPort) {
130 2 1. findRandomPort : Replaced integer subtraction with addition → SURVIVED
2. findRandomPort : Replaced integer subtraction with addition → NO_COVERAGE
		int portRange = maxPort - minPort;
131 17 1. findRandomPort : Replaced integer addition with subtraction → NO_COVERAGE
2. findRandomPort : Replaced integer addition with subtraction → SURVIVED
3. findRandomPort : Replaced integer addition with subtraction → SURVIVED
4. findRandomPort : Replaced integer addition with subtraction → NO_COVERAGE
5. findRandomPort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → SURVIVED
6. findRandomPort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → NO_COVERAGE
7. findRandomPort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → TIMED_OUT
8. findRandomPort : Replaced integer addition with subtraction → KILLED
9. findRandomPort : Replaced integer addition with subtraction → KILLED
10. findRandomPort : Replaced integer addition with subtraction → KILLED
11. findRandomPort : Replaced integer addition with subtraction → KILLED
12. findRandomPort : Replaced integer addition with subtraction → KILLED
13. findRandomPort : Replaced integer addition with subtraction → KILLED
14. findRandomPort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → KILLED
15. findRandomPort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → KILLED
16. findRandomPort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → KILLED
17. findRandomPort : replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → KILLED
		return minPort + random.nextInt(portRange + 1);
132
	}
133
134
	private static void assertIsTrue(boolean condition, String message) {
135 8 1. assertIsTrue : negated conditional → NO_COVERAGE
2. assertIsTrue : negated conditional → KILLED
3. assertIsTrue : negated conditional → KILLED
4. assertIsTrue : negated conditional → KILLED
5. assertIsTrue : negated conditional → KILLED
6. assertIsTrue : negated conditional → KILLED
7. assertIsTrue : negated conditional → KILLED
8. assertIsTrue : negated conditional → KILLED
		if (!condition) {
136
			throw new IllegalArgumentException(message);
137
		}
138
	}
139
}

Mutations

67

1.1
Location : findAvailablePort
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : findAvailablePort
Killed by : none
changed conditional boundary → TIMED_OUT

3.3
Location : findAvailablePort
Killed by : none
changed conditional boundary → NO_COVERAGE

4.4
Location : findAvailablePort
Killed by : oghamtesting.it.sms.simulator.JsmppSimulatorSpec
negated conditional → KILLED

5.5
Location : findAvailablePort
Killed by : oghamall.it.configuration.EmptyBuilderTest.noMimetypeConfigurationCantSendEmail(oghamall.it.configuration.EmptyBuilderTest)
negated conditional → KILLED

6.6
Location : findAvailablePort
Killed by : oghamjavamail.it.JavaMailSmtpTest.missingRecipientIsInvalid(oghamjavamail.it.JavaMailSmtpTest)
negated conditional → KILLED

7.7
Location : findAvailablePort
Killed by : oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest.missingBeanErrorUsingThymeleaf(oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest)
negated conditional → KILLED

8.8
Location : findAvailablePort
Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledButAutoGuessNotEnabledAndNoEncodingConfiguredAndLongMessageShouldFailIndicatingThatNoSplitterIsConfigured(oghamcloudhopper.it.PartialConfigurationTest)
negated conditional → KILLED

9.9
Location : findAvailablePort
Killed by : oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest.simple(oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest)
negated conditional → KILLED

10.10
Location : findAvailablePort
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.emailUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
negated conditional → KILLED

11.11
Location : findAvailablePort
Killed by : none
negated conditional → NO_COVERAGE

12.12
Location : findAvailablePort
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE

13.13
Location : findAvailablePort
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → KILLED

14.14
Location : findAvailablePort
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED

68

1.1
Location : findAvailablePort
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : findAvailablePort
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : findAvailablePort
Killed by : oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest.simple(oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest)
negated conditional → KILLED

4.4
Location : findAvailablePort
Killed by : oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest.missingBeanErrorUsingThymeleaf(oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest)
negated conditional → KILLED

5.5
Location : findAvailablePort
Killed by : oghamall.it.configuration.EmptyBuilderTest.noMimetypeConfigurationCantSendEmail(oghamall.it.configuration.EmptyBuilderTest)
negated conditional → KILLED

6.6
Location : findAvailablePort
Killed by : none
negated conditional → NO_COVERAGE

7.7
Location : findAvailablePort
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.emailUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
negated conditional → KILLED

8.8
Location : findAvailablePort
Killed by : oghamjavamail.it.JavaMailSmtpTest.missingRecipientIsInvalid(oghamjavamail.it.JavaMailSmtpTest)
negated conditional → KILLED

9.9
Location : findAvailablePort
Killed by : oghamtesting.it.sms.simulator.JsmppSimulatorSpec
negated conditional → KILLED

10.10
Location : findAvailablePort
Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledButAutoGuessNotEnabledAndNoEncodingConfiguredAndLongMessageShouldFailIndicatingThatNoSplitterIsConfigured(oghamcloudhopper.it.PartialConfigurationTest)
negated conditional → KILLED

11.11
Location : findAvailablePort
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE

12.12
Location : findAvailablePort
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED

13.13
Location : findAvailablePort
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → KILLED

69

1.1
Location : findAvailablePort
Killed by : oghamtesting.it.sms.simulator.JsmppSimulatorSpec
changed conditional boundary → KILLED

2.2
Location : findAvailablePort
Killed by : oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest.missingBeanErrorUsingThymeleaf(oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest)
changed conditional boundary → KILLED

3.3
Location : findAvailablePort
Killed by : oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest.simple(oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest)
changed conditional boundary → KILLED

4.4
Location : findAvailablePort
Killed by : oghamjavamail.it.JavaMailSmtpTest.missingRecipientIsInvalid(oghamjavamail.it.JavaMailSmtpTest)
changed conditional boundary → KILLED

5.5
Location : findAvailablePort
Killed by : oghamall.it.configuration.EmptyBuilderTest.noMimetypeConfigurationCantSendEmail(oghamall.it.configuration.EmptyBuilderTest)
changed conditional boundary → KILLED

6.6
Location : findAvailablePort
Killed by : none
changed conditional boundary → NO_COVERAGE

7.7
Location : findAvailablePort
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.emailUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
changed conditional boundary → KILLED

8.8
Location : findAvailablePort
Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledButAutoGuessNotEnabledAndNoEncodingConfiguredAndLongMessageShouldFailIndicatingThatNoSplitterIsConfigured(oghamcloudhopper.it.PartialConfigurationTest)
changed conditional boundary → KILLED

9.9
Location : findAvailablePort
Killed by : none
negated conditional → NO_COVERAGE

10.10
Location : findAvailablePort
Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledButAutoGuessNotEnabledAndNoEncodingConfiguredAndLongMessageShouldFailIndicatingThatNoSplitterIsConfigured(oghamcloudhopper.it.PartialConfigurationTest)
negated conditional → KILLED

11.11
Location : findAvailablePort
Killed by : oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest.missingBeanErrorUsingThymeleaf(oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest)
negated conditional → KILLED

12.12
Location : findAvailablePort
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.emailUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
negated conditional → KILLED

13.13
Location : findAvailablePort
Killed by : oghamjavamail.it.JavaMailSmtpTest.missingRecipientIsInvalid(oghamjavamail.it.JavaMailSmtpTest)
negated conditional → KILLED

14.14
Location : findAvailablePort
Killed by : oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest.simple(oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest)
negated conditional → KILLED

15.15
Location : findAvailablePort
Killed by : oghamtesting.it.sms.simulator.JsmppSimulatorSpec
negated conditional → KILLED

16.16
Location : findAvailablePort
Killed by : oghamall.it.configuration.EmptyBuilderTest.noMimetypeConfigurationCantSendEmail(oghamall.it.configuration.EmptyBuilderTest)
negated conditional → KILLED

17.17
Location : findAvailablePort
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED

18.18
Location : findAvailablePort
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → KILLED

19.19
Location : findAvailablePort
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE

71

1.1
Location : findAvailablePort
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

2.2
Location : findAvailablePort
Killed by : none
Replaced integer subtraction with addition → SURVIVED

3.3
Location : findAvailablePort
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
Replaced integer subtraction with addition → KILLED

75

1.1
Location : findAvailablePort
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : findAvailablePort
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
changed conditional boundary → KILLED

3.3
Location : findAvailablePort
Killed by : none
changed conditional boundary → SURVIVED

4.4
Location : findAvailablePort
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.emailUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
negated conditional → KILLED

5.5
Location : findAvailablePort
Killed by : oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest.missingBeanErrorUsingThymeleaf(oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest)
negated conditional → KILLED

6.6
Location : findAvailablePort
Killed by : oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest.simple(oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest)
negated conditional → KILLED

7.7
Location : findAvailablePort
Killed by : none
negated conditional → NO_COVERAGE

8.8
Location : findAvailablePort
Killed by : oghamtesting.it.sms.simulator.JsmppSimulatorSpec
negated conditional → KILLED

9.9
Location : findAvailablePort
Killed by : oghamjavamail.it.JavaMailSmtpTest.missingRecipientIsInvalid(oghamjavamail.it.JavaMailSmtpTest)
negated conditional → KILLED

10.10
Location : findAvailablePort
Killed by : oghamall.it.configuration.EmptyBuilderTest.noMimetypeConfigurationCantSendEmail(oghamall.it.configuration.EmptyBuilderTest)
negated conditional → KILLED

11.11
Location : findAvailablePort
Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledButAutoGuessNotEnabledAndNoEncodingConfiguredAndLongMessageShouldFailIndicatingThatNoSplitterIsConfigured(oghamcloudhopper.it.PartialConfigurationTest)
negated conditional → KILLED

79

1.1
Location : findAvailablePort
Killed by : none
Changed increment from 1 to -1 → SURVIVED

2.2
Location : findAvailablePort
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

3.3
Location : findAvailablePort
Killed by : none
Changed increment from 1 to -1 → TIMED_OUT

80

1.1
Location : findAvailablePort
Killed by : oghamjavamail.it.JavaMailSmtpTest.missingRecipientIsInvalid(oghamjavamail.it.JavaMailSmtpTest)
negated conditional → KILLED

2.2
Location : findAvailablePort
Killed by : oghamtesting.it.sms.simulator.JsmppSimulatorSpec
negated conditional → KILLED

3.3
Location : findAvailablePort
Killed by : oghamall.it.configuration.EmptyBuilderTest.noMimetypeConfigurationCantSendEmail(oghamall.it.configuration.EmptyBuilderTest)
negated conditional → KILLED

4.4
Location : findAvailablePort
Killed by : oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest.missingBeanErrorUsingThymeleaf(oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest)
negated conditional → KILLED

5.5
Location : findAvailablePort
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.emailUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
negated conditional → KILLED

6.6
Location : findAvailablePort
Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledButAutoGuessNotEnabledAndNoEncodingConfiguredAndLongMessageShouldFailIndicatingThatNoSplitterIsConfigured(oghamcloudhopper.it.PartialConfigurationTest)
negated conditional → KILLED

7.7
Location : findAvailablePort
Killed by : oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest.simple(oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest)
negated conditional → KILLED

8.8
Location : findAvailablePort
Killed by : none
negated conditional → NO_COVERAGE

82

1.1
Location : findAvailablePort
Killed by : oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest.smsUsingFreemarkerTemplateShouldResolveBeans(oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest)
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → KILLED

2.2
Location : findAvailablePort
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.smsUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → KILLED

3.3
Location : findAvailablePort
Killed by : oghamtesting.it.sms.simulator.JsmppSimulatorSpec
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → KILLED

4.4
Location : findAvailablePort
Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledButAutoGuessNotEnabledAndNoEncodingConfiguredAndLongMessageShouldFailIndicatingThatNoSplitterIsConfigured(oghamcloudhopper.it.PartialConfigurationTest)
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → KILLED

5.5
Location : findAvailablePort
Killed by : none
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → SURVIVED

6.6
Location : findAvailablePort
Killed by : none
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → NO_COVERAGE

7.7
Location : findAvailablePort
Killed by : oghamall.it.freemarker.StaticMethodAccessDisabledTest.smsUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamall.it.freemarker.StaticMethodAccessDisabledTest)
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePort → KILLED

100

1.1
Location : findAvailablePorts
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : findAvailablePorts
Killed by : none
changed conditional boundary → SURVIVED

3.3
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
negated conditional → KILLED

4.4
Location : findAvailablePorts
Killed by : none
negated conditional → NO_COVERAGE

5.5
Location : findAvailablePorts
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED

6.6
Location : findAvailablePorts
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE

101

1.1
Location : findAvailablePorts
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : findAvailablePorts
Killed by : none
changed conditional boundary → SURVIVED

3.3
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
negated conditional → KILLED

4.4
Location : findAvailablePorts
Killed by : none
negated conditional → NO_COVERAGE

5.5
Location : findAvailablePorts
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE

6.6
Location : findAvailablePorts
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED

102

1.1
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
changed conditional boundary → KILLED

2.2
Location : findAvailablePorts
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : findAvailablePorts
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
negated conditional → KILLED

5.5
Location : findAvailablePorts
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE

6.6
Location : findAvailablePorts
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → SURVIVED

103

1.1
Location : findAvailablePorts
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
changed conditional boundary → KILLED

3.3
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
negated conditional → KILLED

4.4
Location : findAvailablePorts
Killed by : none
negated conditional → NO_COVERAGE

5.5
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → KILLED

6.6
Location : findAvailablePorts
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE

104

1.1
Location : findAvailablePorts
Killed by : none
changed conditional boundary → SURVIVED

2.2
Location : findAvailablePorts
Killed by : none
changed conditional boundary → NO_COVERAGE

3.3
Location : findAvailablePorts
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

4.4
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
Replaced integer subtraction with addition → KILLED

5.5
Location : findAvailablePorts
Killed by : none
negated conditional → NO_COVERAGE

6.6
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
negated conditional → KILLED

7.7
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → KILLED

8.8
Location : findAvailablePorts
Killed by : none
removed call to fr/sii/ogham/testing/util/port/DefaultPortFinder::assertIsTrue → NO_COVERAGE

108

1.1
Location : findAvailablePorts
Killed by : none
changed conditional boundary → NO_COVERAGE

2.2
Location : findAvailablePorts
Killed by : none
changed conditional boundary → SURVIVED

3.3
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
changed conditional boundary → KILLED

4.4
Location : findAvailablePorts
Killed by : none
changed conditional boundary → NO_COVERAGE

5.5
Location : findAvailablePorts
Killed by : none
Changed increment from 1 to -1 → SURVIVED

6.6
Location : findAvailablePorts
Killed by : none
Changed increment from 1 to -1 → NO_COVERAGE

7.7
Location : findAvailablePorts
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

8.8
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
Replaced integer addition with subtraction → KILLED

9.9
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
negated conditional → KILLED

10.10
Location : findAvailablePorts
Killed by : none
negated conditional → NO_COVERAGE

11.11
Location : findAvailablePorts
Killed by : none
negated conditional → NO_COVERAGE

12.12
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
negated conditional → KILLED

112

1.1
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
negated conditional → KILLED

2.2
Location : findAvailablePorts
Killed by : none
negated conditional → NO_COVERAGE

116

1.1
Location : findAvailablePorts
Killed by : none
replaced return value with null for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePorts → NO_COVERAGE

2.2
Location : findAvailablePorts
Killed by : oghamtesting.ut.util.port.DefaultPortFinderSpec
replaced return value with null for fr/sii/ogham/testing/util/port/DefaultPortFinder::findAvailablePorts → KILLED

130

1.1
Location : findRandomPort
Killed by : none
Replaced integer subtraction with addition → SURVIVED

2.2
Location : findRandomPort
Killed by : none
Replaced integer subtraction with addition → NO_COVERAGE

131

1.1
Location : findRandomPort
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

2.2
Location : findRandomPort
Killed by : none
Replaced integer addition with subtraction → SURVIVED

3.3
Location : findRandomPort
Killed by : oghamjavamail.it.builder.JavaMailCustomConfigurationTest.noHostDefinedShouldFail(oghamjavamail.it.builder.JavaMailCustomConfigurationTest)
Replaced integer addition with subtraction → KILLED

4.4
Location : findRandomPort
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.smsUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
Replaced integer addition with subtraction → KILLED

5.5
Location : findRandomPort
Killed by : none
Replaced integer addition with subtraction → SURVIVED

6.6
Location : findRandomPort
Killed by : oghamall.it.configuration.EmptyBuilderTest.noMimetypeConfigurationCantSendEmail(oghamall.it.configuration.EmptyBuilderTest)
Replaced integer addition with subtraction → KILLED

7.7
Location : findRandomPort
Killed by : none
Replaced integer addition with subtraction → NO_COVERAGE

8.8
Location : findRandomPort
Killed by : oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest.smsUsingFreemarkerTemplateShouldResolveBeans(oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest)
Replaced integer addition with subtraction → KILLED

9.9
Location : findRandomPort
Killed by : oghamtesting.it.sms.simulator.JsmppSimulatorSpec
Replaced integer addition with subtraction → KILLED

10.10
Location : findRandomPort
Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledAndAutoGuessEnabledButNoEncodingConfiguredAndLongMessageShouldFailIndicatingThatNoSplitterCouldSplitTheMessage(oghamcloudhopper.it.PartialConfigurationTest)
Replaced integer addition with subtraction → KILLED

11.11
Location : findRandomPort
Killed by : oghamall.it.freemarker.StaticMethodAccessDisabledTest.smsUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamall.it.freemarker.StaticMethodAccessDisabledTest)
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → KILLED

12.12
Location : findRandomPort
Killed by : none
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → SURVIVED

13.13
Location : findRandomPort
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.smsUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → KILLED

14.14
Location : findRandomPort
Killed by : none
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → NO_COVERAGE

15.15
Location : findRandomPort
Killed by : none
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → TIMED_OUT

16.16
Location : findRandomPort
Killed by : oghamtesting.it.sms.simulator.JsmppSimulatorSpec
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → KILLED

17.17
Location : findRandomPort
Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledButAutoGuessNotEnabledAndNoEncodingConfiguredAndLongMessageShouldFailIndicatingThatNoSplitterIsConfigured(oghamcloudhopper.it.PartialConfigurationTest)
replaced int return with 0 for fr/sii/ogham/testing/util/port/DefaultPortFinder::findRandomPort → KILLED

135

1.1
Location : assertIsTrue
Killed by : oghamspringbootv2autoconfigure.it.StaticMethodAccessTest.emailUsingFreemarkerTemplateAndStaticMethodAccessDisabledShouldFail(oghamspringbootv2autoconfigure.it.StaticMethodAccessTest)
negated conditional → KILLED

2.2
Location : assertIsTrue
Killed by : oghamcloudhopper.it.PartialConfigurationTest.splitterEnabledButAutoGuessNotEnabledAndNoEncodingConfiguredAndLongMessageShouldFailIndicatingThatNoSplitterIsConfigured(oghamcloudhopper.it.PartialConfigurationTest)
negated conditional → KILLED

3.3
Location : assertIsTrue
Killed by : none
negated conditional → NO_COVERAGE

4.4
Location : assertIsTrue
Killed by : oghamjavamail.it.JavaMailSmtpTest.missingRecipientIsInvalid(oghamjavamail.it.JavaMailSmtpTest)
negated conditional → KILLED

5.5
Location : assertIsTrue
Killed by : oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest.missingBeanErrorUsingThymeleaf(oghamspringbootv1autoconfigure.it.SpringBeanResolutionTest)
negated conditional → KILLED

6.6
Location : assertIsTrue
Killed by : oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest.simple(oghamcore.ut.sms.sender.impl.PhoneNumberTranslatorSenderTest)
negated conditional → KILLED

7.7
Location : assertIsTrue
Killed by : oghamtesting.it.sms.simulator.JsmppSimulatorSpec
negated conditional → KILLED

8.8
Location : assertIsTrue
Killed by : oghamall.it.configuration.EmptyBuilderTest.noMimetypeConfigurationCantSendEmail(oghamall.it.configuration.EmptyBuilderTest)
negated conditional → KILLED

Active mutators

Tests examined


Report generated by PIT OGHAM