diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/CheckerTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/CheckerTest.java index d4bb718e259..84d61e79a3c 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/CheckerTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/CheckerTest.java @@ -894,18 +894,17 @@ public void testCacheAndFilterWhichDoesNotImplementExternalResourceHolderInterfa final File cacheFile = File.createTempFile("junit", null, temporaryFolder); checkerConfig.addProperty("cacheFile", cacheFile.getPath()); - final String[] expected = CommonUtil.EMPTY_STRING_ARRAY; final String pathToEmptyFile = File.createTempFile("file", ".java", temporaryFolder).getPath(); - verify(checkerConfig, pathToEmptyFile, expected); + execute(checkerConfig, pathToEmptyFile); final Properties cacheAfterFirstRun = new Properties(); try (BufferedReader reader = Files.newBufferedReader(cacheFile.toPath())) { cacheAfterFirstRun.load(reader); } // One more time to use cache. - verify(checkerConfig, pathToEmptyFile, expected); + execute(checkerConfig, pathToEmptyFile); final Properties cacheAfterSecondRun = new Properties(); try (BufferedReader reader = Files.newBufferedReader(cacheFile.toPath())) { cacheAfterSecondRun.load(reader); @@ -1049,9 +1048,8 @@ public void testCacheOnViolationSuppression() throws Exception { final String fileViolationPath = File.createTempFile("ViolationFile", ".java", temporaryFolder).getPath(); - final String[] expected = CommonUtil.EMPTY_STRING_ARRAY; - verify(checkerConfig, fileViolationPath, expected); + execute(checkerConfig, fileViolationPath); try (InputStream input = Files.newInputStream(cacheFile.toPath())) { final Properties details = new Properties();