AtlasStructType extends AtlasType { @Override public Object getNormalizedValue(Object obj) { Object ret = null; if (obj != null) { if (isValidValue(obj)) { if (obj instanceof AtlasStruct) { normalizeAttributeValues((AtlasStruct) obj); ret = obj; } else if (obj instanceof Map) { normalizeAttributeValues((Map) obj); ret = obj; } } } return ret; } AtlasStructType(AtlasStructDef structDef);  AtlasStructType(AtlasStructDef structDef, AtlasTypeRegistry typeRegistry); AtlasStructDef getStructDef(); AtlasType getAttributeType(String attributeName); AtlasAttributeDef getAttributeDef(String attributeName); @Override void resolveReferences(AtlasTypeRegistry typeRegistry); @Override void resolveReferencesPhase2(AtlasTypeRegistry typeRegistry); @Override AtlasStruct createDefaultValue(); @Override Object createDefaultValue(Object defaultValue); Map<String, AtlasAttribute> getAllAttributes(); Map<String, AtlasAttribute> getUniqAttributes(); AtlasAttribute getAttribute(String attributeName); @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(AtlasStruct obj); void normalizeAttributeValuesForUpdate(AtlasStruct obj); void normalizeAttributeValues(Map<String, Object> obj); void normalizeAttributeValuesForUpdate(Map<String, Object> obj); void populateDefaultValues(AtlasStruct obj); String getQualifiedAttributeName(String attrName);  }
@Test public void testStructTypeGetNormalizedValue() { assertNull(structType.getNormalizedValue(null), "value=" + null); for (Object value : validValues) { if (value == null) { continue; } Object normalizedValue = structType.getNormalizedValue(value); assertNotNull(normalizedValue, "value=" + value); } for (Object value : invalidValues) { assertNull(structType.getNormalizedValue(value), "value=" + value); } }