ValidationExecutor { public @NotNull Map<String, Validator> getUnusedValidatorsById() { Map<String, Validator> unusedValidators = new HashMap<>(validatorsById); unusedValidators.keySet().removeAll(documentViewXmlValidators.keySet()); unusedValidators.keySet().removeAll(nodePathValidators.keySet()); unusedValidators.keySet().removeAll(metaInfPathValidators.keySet()); unusedValidators.keySet().removeAll(jcrPathValidators.keySet()); unusedValidators.keySet().removeAll(genericJcrDataValidators.keySet()); unusedValidators.keySet().removeAll(genericMetaInfDataValidators.keySet()); unusedValidators.keySet().removeAll(filterValidators.keySet()); unusedValidators.keySet().removeAll(propertiesValidators.keySet()); return unusedValidators; } ValidationExecutor(@NotNull Map<String, Validator> validatorsById); @NotNull Map<String, Validator> getAllValidatorsById(); @NotNull Map<String, Validator> getUnusedValidatorsById(); @NotNull Collection<ValidationViolation> validateMetaInf(@Nullable InputStream input, @NotNull Path filePath, @NotNull Path basePath); @NotNull Collection<ValidationViolation> validateJcrRoot(@Nullable InputStream input, @NotNull Path filePath, @NotNull Path basePath); @NotNull Collection<ValidationViolation> done(); static @NotNull String filePathToNodePath(@NotNull Path filePath);  }
@Test public void testUnusedValidators() throws ParserConfigurationException, SAXException { Assert.assertThat(executor.getUnusedValidatorsById(), Matchers.hasEntry("unusedid", unusedValidator)); Assert.assertThat(executor.getUnusedValidatorsById(), Matchers.aMapWithSize(1)); }