diff --git a/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/annotations/ExcludedAnnotationInterceptorTest.java b/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/annotations/ExcludedAnnotationInterceptorTest.java index ee0e26125..0879274ef 100644 --- a/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/annotations/ExcludedAnnotationInterceptorTest.java +++ b/pitest-entry/src/test/java/org/pitest/mutationtest/build/intercept/annotations/ExcludedAnnotationInterceptorTest.java @@ -115,7 +115,10 @@ public void shouldNotFilterMutationsInNestedLambdaWithinUnannotatedOverloadedMet // Should include mutations from the unannotated method and its nested lambdas assertThat(actual).anyMatch(mutation -> mutation.getId().getLocation().getMethodName().equals("baz")); - assertThat(actual).anyMatch(mutation -> mutation.getId().getLocation().getMethodName().startsWith("lambda$baz$")); + assertThat(actual).anyMatch(mutation -> { + String methodName = mutation.getId().getLocation().getMethodName(); + return methodName.startsWith("lambda$baz$") || methodName.startsWith("lambda$null$"); + }); } @Test