All, There is an issue while running mutation test cases.
Getting the mutation test case failures as follows:
removed call to java/util/List::sort → SURVIVED
removed call to java/util/List::forEach → SURVIVED
The code:
List<CustomClass> data;//address is the field in the CustomClass
UseCase useCase; //setEventBus is the method
data.sort(Comparator.comparingInt(CustomClass::getAddress));
data.forEach(frame -> useCase.setEventBus(frameList, data.getAddress()));
I have written couple of unit test cases but mutants survived. Can anyone help here for this problem?
The failed mutation cases are solved.
removed call to java/util/List::sort → SURVIVED:
Added the test case for the below line data.sort(Comparator.comparingInt(CustomClass::getAddress)); The test case is added to store the unsorted data in 'data' object.