@Test
public void testUnknownNamespace() {

    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[] { "sling:Folder" }, false, PropertyType.STRING));
    // nt:file is only supposed to have jcr:created property
    DocViewNode node = new DocViewNode("jcr:root", "jcr:root", null, props, null, "sling:Folder");
    ValidationExecutorTest.assertViolation(validator.validate(node, nodeContext, false),
            new ValidationMessage(ValidationMessageSeverity.WARN,
                    String.format(NodeTypeValidator.MESSAGE_UNKNOWN_NODE_TYPE_OR_NAMESPACE,
                            "Invalid primary type sling:Folder: 'sling: is not a registered namespace prefix.'")));
}