in src/main/java/org/apache/sling/testing/mock/jcr/MockNodeTypeManager.java [167:175]
public NodeType registerNodeType(NodeTypeDefinition ntd, boolean allowUpdate) throws RepositoryException {
if (ResolveMode.MOCK_ALL.equals(this.mode)) {
throw new UnsupportedOperationException();
}
if (!allowUpdate && registeredNTs.containsKey(ntd.getName())) {
throw new NodeTypeExistsException(String.format(NODETYPE_ALREADY_EXISTS, ntd.getName()));
}
return registeredNTs.put(ntd.getName(), new MockNodeType(ntd, this));
}