AtlasClassificationType extends AtlasStructType { @Override public boolean validateValue(Object obj, String objName, List<String> messages) { boolean ret = true; if (obj != null) { for (AtlasClassificationType superType : superTypes) { ret = superType.validateValue(obj, objName, messages) && ret; } ret = super.validateValue(obj, objName, messages) && ret; } return ret; } AtlasClassificationType(AtlasClassificationDef classificationDef);  AtlasClassificationType(AtlasClassificationDef classificationDef, AtlasTypeRegistry typeRegistry); AtlasClassificationDef getClassificationDef(); @Override void resolveReferences(AtlasTypeRegistry typeRegistry); @Override void resolveReferencesPhase2(AtlasTypeRegistry typeRegistry); @Override void resolveReferencesPhase3(AtlasTypeRegistry typeRegistry); Set<String> getSuperTypes(); Set<String> getAllSuperTypes(); Set<String> getAllSubTypes(); Set<String> getTypeAndAllSubTypes(); String getTypeAndAllSubTypesQryStr(); boolean isSuperTypeOf(AtlasClassificationType classificationType); boolean isSuperTypeOf(String classificationName); boolean isSubTypeOf(AtlasClassificationType classificationType); boolean isSubTypeOf(String classificationName); @Override AtlasClassification createDefaultValue(); @Override boolean isValidValue(Object obj); @Override boolean isValidValueForUpdate(Object obj); @Override Object getNormalizedValue(Object obj); @Override Object getNormalizedValueForUpdate(Object obj); @Override boolean validateValue(Object obj, String objName, List<String> messages); @Override boolean validateValueForUpdate(Object obj, String objName, List<String> messages); void normalizeAttributeValues(AtlasClassification classification); void normalizeAttributeValuesForUpdate(AtlasClassification classification); @Override void normalizeAttributeValues(Map<String, Object> obj); void normalizeAttributeValuesForUpdate(Map<String, Object> obj); void populateDefaultValues(AtlasClassification classification);  }
@Test public void testClassificationTypeValidateValue() { List<String> messages = new ArrayList<>(); for (Object value : validValues) { assertTrue(classificationType.validateValue(value, "testObj", messages)); assertEquals(messages.size(), 0, "value=" + value); } for (Object value : invalidValues) { assertFalse(classificationType.validateValue(value, "testObj", messages)); assertTrue(messages.size() > 0, "value=" + value); messages.clear(); } }