diff --git a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/JUnitSingleArgumentsTest.java b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/JUnitSingleArgumentsTest.java index 544b16a9189..4554d182073 100644 --- a/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/JUnitSingleArgumentsTest.java +++ b/error-prone-contrib/src/test/java/tech/picnic/errorprone/bugpatterns/JUnitSingleArgumentsTest.java @@ -9,6 +9,8 @@ void identification() { CompilationTestHelper.newInstance(JUnitSingleArguments.class, getClass()) .addSourceLines( "A.java", + "import static java.util.function.Function.identity;", + "import static java.util.Objects.requireNonNull;", "import static org.junit.jupiter.params.provider.Arguments.arguments;", "import java.util.stream.Stream;", "", @@ -19,6 +21,9 @@ void identification() { " // BUG: Diagnostic contains:", " arguments(1);", " arguments(1,2);", + " ", + " identity();", + " requireNonNull(null);", " }", "}") .doTest();