@Test
public void testNotAllowedProperty() {

    NodeContext nodeContext = new NodeContextImpl("/apps/test/node4", Paths.get("node4"), Paths.get(""));
    Map<String, DocViewProperty> props = new HashMap<>();
    DocViewProperty prop = new DocViewProperty("{}invalid-prop", new String[] { "some-value" }, false, PropertyType.STRING);
    props.put("{}invalid-prop", prop);
    props.put(NameConstants.JCR_PRIMARYTYPE.toString(), new DocViewProperty(NameConstants.JCR_PRIMARYTYPE.toString(),
            new String[] { JcrConstants.NT_FILE }, false, PropertyType.STRING));
    // nt:file is only supposed to have jcr:created property
    DocViewNode node = new DocViewNode("jcr:root", "jcr:root", null, props, null, JcrConstants.NT_FILE);
    ValidationExecutorTest.assertViolation(validator.validate(node, nodeContext, false),
            new ValidationMessage(ValidationMessageSeverity.ERROR,
                    String.format(NodeTypeValidator.MESSAGE_PROPERTY_NOT_ALLOWED, prop, JcrConstants.NT_FILE,
                            "No property definition found for name!")));
}