in src/main/java/org/apache/sling/testing/mock/jcr/MockNodeDefinitionTemplate.java [34:45]
public MockNodeDefinitionTemplate(String declaringNodeTypeName, NodeTypeManager ntMgr, NodeDefinition nodeDef) {
this(declaringNodeTypeName, ntMgr);
// copy ctor
this.name = nodeDef.getName();
this.autoCreated = nodeDef.isAutoCreated();
this.mandatory = nodeDef.isMandatory();
this.opv = nodeDef.getOnParentVersion();
this.protectedStatus = nodeDef.isProtected();
this.requiredPrimaryTypeNames = nodeDef.getRequiredPrimaryTypeNames();
this.defaultPrimaryTypeName = nodeDef.getDefaultPrimaryTypeName();
this.allowSameNameSiblings = nodeDef.allowsSameNameSiblings();
}