in src/main/java/org/apache/sling/testing/mock/jcr/MockTemplateBuilderFactory.java [194:210]
public void build() throws IllegalStateException {
template.setAutoCreated(super.autocreate);
template.setMandatory(super.isMandatory);
template.setOnParentVersion(super.onParent);
template.setProtected(super.isProtected);
template.setRequiredType(super.requiredType);
template.setValueConstraints(constraints.toArray(new String[constraints.size()]));
template.setDefaultValues(values.toArray(new Value[values.size()]));
template.setMultiple(super.isMultiple);
template.setAvailableQueryOperators(super.queryOperators);
template.setFullTextSearchable(super.fullTextSearchable);
template.setQueryOrderable(super.queryOrderable);
@SuppressWarnings("unchecked")
List<PropertyDefinitionTemplate> templates = ntd.template.getPropertyDefinitionTemplates();
templates.add(template);
}