@Test
public void test_filter() throws Exception {

    try (InputStream input = this.getClass().getResourceAsStream("/oak-index/filter.xml")) {
        DefaultWorkspaceFilter filter = new DefaultWorkspaceFilter();
        filter.load(input);
        Collection<ValidationMessage> messages = validator.validate(filter);
        ValidationExecutorTest.assertViolation(messages,
                new ValidationMessage(ValidationMessageSeverity.ERROR,
                        String.format(OakIndexDefinitionValidator.MESSAGE_POTENTIAL_INDEX_IN_FILTER, rootPackagePath,"/oak:index/ccProfile")),
                new ValidationMessage(ValidationMessageSeverity.ERROR, String
                        .format(OakIndexDefinitionValidator.MESSAGE_POTENTIAL_INDEX_IN_FILTER, rootPackagePath, "/apps/project/oak:index/indexDef")),
                new ValidationMessage(ValidationMessageSeverity.ERROR, String
                        .format(OakIndexDefinitionValidator.MESSAGE_POTENTIAL_INDEX_IN_FILTER, rootPackagePath, "/apps/anotherproject/oak:index")));
    }
}