PrivilegeValidator extends DefaultValidator implements PrivilegeConstants { @NotNull private Tree getPrivilegesTree(Root root) throws CommitFailedException { Tree privilegesTree = root.getTree(PRIVILEGES_PATH); if (!privilegesTree.exists()) { throw new CommitFailedException(CONSTRAINT, 44, "Privilege store not initialized."); } return privilegesTree; } PrivilegeValidator(@NotNull Root before, @NotNull Root after, @NotNull TreeProvider treeProvider); @Override void propertyAdded(PropertyState after); @Override void propertyChanged(PropertyState before, PropertyState after); @Override void propertyDeleted(PropertyState before); @Override Validator childNodeAdded(String name, NodeState after); @Override Validator childNodeChanged(String name, NodeState before, NodeState after); @Override Validator childNodeDeleted(String name, NodeState before);  }
@Test(expected = CommitFailedException.class) public void testChangeNext() throws Exception { try { setPrivilegeBits(bitsProvider.getPrivilegesTree(), REP_NEXT, 1); root.commit(); } catch (CommitFailedException e) { throw assertCommitFailed(e, 43); } }