@Test
public void testInvalidChildNodeTypeBelowDefault() {

    NodeContext nodeContext = new NodeContextImpl("/apps/test/node4", Paths.get("node4"), Paths.get(""));
    Map<String, DocViewProperty> props = new HashMap<>();
    props.put(NameConstants.JCR_PRIMARYTYPE.toString(), new DocViewProperty(NameConstants.JCR_PRIMARYTYPE.toString(),
            new String[] { JcrConstants.NT_UNSTRUCTURED }, false, PropertyType.STRING));
    // nt:unstructured below nt:folder is not allowed
    DocViewNode node = new DocViewNode("jcr:root", "jcr:root", null, props, null, JcrConstants.NT_UNSTRUCTURED);
    ValidationExecutorTest.assertViolation(validator.validate(node, nodeContext, false),
            new ValidationMessage(ValidationMessageSeverity.ERROR,
                    String.format(NodeTypeValidator.MESSAGE_CHILD_NODE_OF_NOT_CONTAINED_PARENT_POTENTIALLY_NOT_ALLOWED,
                            "jcr:root [nt:unstructured]", JcrConstants.NT_FOLDER,
                            "Could not find matching child node definition in parent's node type")));
}