pitest
pitest copied to clipboard
`avoidCallsTo` not working for internal classes
Assuming I have a class structure like this:
public class MyClass {
public someMethod1() {
MyInternalClass.someMethod2();
}
private static class MyInternalClass {
static void someMethod2() {
// Do stuff
}
}
}
Then adding com.example.MyClass.MyInternalClass
to avoidCallsTo
should (I assume) prevent the MyInternalClass.someMethod2();
from being mutated, which is not what happens.
Granted, this is not a common setup but it currently seems to be the most reasonable solution to exclude complex logging code from mutation (and code coverage).