### Question:
CheckerMain extends AbstractMojo implements PluginBase { void setSearchPaths(final String[] searchPaths) { this.searchPaths = searchPaths; }  @Override void execute(); @Override PrettyPrintValidationResults.PluginLogger getPluginLogger(); @Override List<String> getExcludeList(); @Override List<String> getSearchPathList(); @Override String[] getValidatorPackages(); @Override String[] getValidatorClasses(); void loadProjectclasspath();  }### Answer:
@Test void shouldDetectIfFileIsOnSearchPath() { testee.setSearchPaths(new String[] {"src/"}); final MojoExecutionException assertionError = Assertions.assertThrows(MojoExecutionException.class, testee::execute); Assertions.assertTrue(assertionError.getMessage().contains("Some files are not valid, see previous logs.")); }
@Test void shouldDetectIfFileIsOnSearchPathWithMultiplePaths() { testee.setSearchPaths(new String[] {"src/main/java","src/"}); final MojoExecutionException assertionError = Assertions.assertThrows(MojoExecutionException.class, testee::execute); Assertions.assertTrue(assertionError.getMessage().contains("Some files are not valid, see previous logs.")); }