public void testRegisterNodeTypeWithPrivilege() throws Exception {
modify(null, JCR_NODE_TYPE_DEFINITION_MANAGEMENT.toString(), true);
try {
Workspace testWsp = testSession.getWorkspace();
NodeTypeManager ntm = testWsp.getNodeTypeManager();
NodeTypeTemplate ntd = ntm.createNodeTypeTemplate();
ntd.setName("testNodeType");
ntd.setMixin(true);
ntm.registerNodeType(ntd, true);
NodeTypeTemplate[] ntds = new NodeTypeTemplate[2];