@Test
public void test_index_at_root() throws Exception {

    Map<String, DocViewProperty> props = new HashMap<>();
    props.put("includedPaths", new DocViewProperty("includedPaths", new String[] { "/home]" }, true, PropertyType.STRING));
    DocViewNode node = new DocViewNode("testindex", "testindex", null, props, null, "oak:QueryIndexDefinition");
    Collection<ValidationMessage> messages = validator.validate(node, "/oak:index/testindex",
            Paths.get("_oak_index/testindex/.content.xml"), true);
    ValidationExecutorTest.assertViolation(messages,
            new ValidationMessage(ValidationMessageSeverity.ERROR,
                    String.format(OakIndexDefinitionValidator.MESSAGE_INDEX_AT_NODE, rootPackagePath, "/oak:index/testindex")));
}