public Validator getRootValidator(NodeState before, NodeState after) {
Validator validator = new RegistrationValidator(
ReadOnlyNodeTypeManager.getInstance(before),
ReadOnlyNodeTypeManager.getInstance(after),
new ReadOnlyTree(before), new ReadOnlyTree(after));
return new SubtreeValidator(validator, JcrConstants.JCR_SYSTEM, NodeTypeConstants.JCR_NODE_TYPES);
}