Demo.java

1
package com.demo;
2
3
import java.util.List;
4
import java.util.stream.Stream;
5
6
public class Demo {
7
    public String tryWithRecources(List<String> strings) {
8 3 1. tryWithRecources : negated conditional → NO_COVERAGE
2. tryWithRecources : removed call to java/util/stream/Stream::close → NO_COVERAGE
3. tryWithRecources : removed call to java/lang/Throwable::addSuppressed → NO_COVERAGE
        try (Stream<String> first = strings.stream()) {
9 1 1. tryWithRecources : replaced return value with "" for com/demo/Demo::tryWithRecources → KILLED
            return first.findFirst()
10
                    .orElse("bye");
11 2 1. tryWithRecources : negated conditional → SURVIVED
2. tryWithRecources : removed call to java/util/stream/Stream::close → SURVIVED
        }
12
    }
13
}

Mutations

8

1.1
Location : tryWithRecources
Killed by : none
negated conditional → NO_COVERAGE

2.2
Location : tryWithRecources
Killed by : none
removed call to java/util/stream/Stream::close → NO_COVERAGE

3.3
Location : tryWithRecources
Killed by : none
removed call to java/lang/Throwable::addSuppressed → NO_COVERAGE

9

1.1
Location : tryWithRecources
Killed by : com.demo.DemoTest.shouldReturnFirstStringFromList(com.demo.DemoTest)
replaced return value with "" for com/demo/Demo::tryWithRecources → KILLED

11

1.1
Location : tryWithRecources
Killed by : none
negated conditional → SURVIVED

2.2
Location : tryWithRecources
Killed by : none
removed call to java/util/stream/Stream::close → SURVIVED

Active mutators

Tests examined


Report generated by PIT 1.5.1