graph.set(JcrLexicon.PRIMARY_TYPE.getString(registry)).on("/a").to(JcrNtLexicon.UNSTRUCTURED);
graph.set(JcrLexicon.MIXIN_TYPES.getString(registry)).on("/a").to(MIXIN_TYPE_B);
Node rootNode = session.getRootNode();
Node nodeA = rootNode.getNode("a");
nodeA.removeMixin(MIXIN_TYPE_B.getString(registry));
}
@Test( expected = ConstraintViolationException.class )
public void shouldNotAllowRemovalIfExistingChildNodeWouldHaveNoDefinition() throws Exception {
graph.create("/a").and().create("/a/nodeB").and();