@Override
protected List<NodeTypeTemplate> getTestTypes() {
NodeTypeTemplate constrainedType = new JcrNodeTypeTemplate(this.context);
constrainedType.setName("dnatest:constrainedType");
PropertyDefinitionTemplate propBinary = new JcrPropertyDefinitionTemplate(this.context);
propBinary.setName("dnatest:constrainedBinary");
propBinary.setRequiredType(PropertyType.BINARY);
propBinary.setValueConstraints(EXPECTED_BINARY_CONSTRAINTS);
constrainedType.getPropertyDefinitionTemplates().add(propBinary);
PropertyDefinitionTemplate propDate = new JcrPropertyDefinitionTemplate(this.context);
propDate.setName("dnatest:constrainedDate");
propDate.setRequiredType(PropertyType.DATE);
propDate.setValueConstraints(EXPECTED_DATE_CONSTRAINTS);
constrainedType.getPropertyDefinitionTemplates().add(propDate);
PropertyDefinitionTemplate propDouble = new JcrPropertyDefinitionTemplate(this.context);
propDouble.setName("dnatest:constrainedDouble");
propDouble.setRequiredType(PropertyType.DOUBLE);
propDouble.setValueConstraints(EXPECTED_DOUBLE_CONSTRAINTS);
constrainedType.getPropertyDefinitionTemplates().add(propDouble);
PropertyDefinitionTemplate propLong = new JcrPropertyDefinitionTemplate(this.context);
propLong.setName("dnatest:constrainedLong");
propLong.setRequiredType(PropertyType.LONG);
propLong.setValueConstraints(EXPECTED_LONG_CONSTRAINTS);
constrainedType.getPropertyDefinitionTemplates().add(propLong);
PropertyDefinitionTemplate propName = new JcrPropertyDefinitionTemplate(this.context);
propName.setName("dnatest:constrainedName");
propName.setRequiredType(PropertyType.NAME);
propName.setValueConstraints(EXPECTED_NAME_CONSTRAINTS);
constrainedType.getPropertyDefinitionTemplates().add(propName);
PropertyDefinitionTemplate propPath = new JcrPropertyDefinitionTemplate(this.context);
propPath.setName("dnatest:constrainedPath");
propPath.setRequiredType(PropertyType.PATH);
propPath.setValueConstraints(EXPECTED_PATH_CONSTRAINTS);
constrainedType.getPropertyDefinitionTemplates().add(propPath);
PropertyDefinitionTemplate propReference = new JcrPropertyDefinitionTemplate(this.context);
propReference.setName("dnatest:constrainedReference");
propReference.setRequiredType(PropertyType.REFERENCE);
propReference.setValueConstraints(EXPECTED_REFERENCE_CONSTRAINTS);
constrainedType.getPropertyDefinitionTemplates().add(propReference);
PropertyDefinitionTemplate propString = new JcrPropertyDefinitionTemplate(this.context);
propString.setName("dnatest:constrainedString");
propString.setRequiredType(PropertyType.STRING);
propString.setValueConstraints(EXPECTED_STRING_CONSTRAINTS);
constrainedType.getPropertyDefinitionTemplates().add(propString);
return Collections.singletonList(constrainedType);
}