AtlasMapType extends AtlasType { @Override public boolean isValidValue(Object obj) { if (obj != null) { if (obj instanceof Map) { Map<Object, Objects> map = (Map<Object, Objects>) obj; for (Map.Entry e : map.entrySet()) { if (!keyType.isValidValue(e.getKey()) || !valueType.isValidValue(e.getValue())) { return false; } } } else { return false; } } return true; } AtlasMapType(String keyTypeName, String valueTypeName);  AtlasMapType(AtlasType keyType, AtlasType valueType);  AtlasMapType(String keyTypeName, String valueTypeName, AtlasTypeRegistry typeRegistry); String getKeyTypeName(); String getValueTypeName(); AtlasType getKeyType(); AtlasType getValueType(); void setKeyType(AtlasType keyType); @Override void resolveReferences(AtlasTypeRegistry typeRegistry); @Override Map<Object, Object> createDefaultValue(); @Override boolean isValidValue(Object obj); @Override boolean isValidValueForUpdate(Object obj); @Override Map<Object, Object> getNormalizedValue(Object obj); @Override Map<Object, Object> getNormalizedValueForUpdate(Object obj); @Override boolean validateValue(Object obj, String objName, List<String> messages); @Override boolean validateValueForUpdate(Object obj, String objName, List<String> messages); @Override AtlasType getTypeForAttribute();  }
@Test public void testMapTypeIsValidValue() { for (Object value : validValues) { assertTrue(intIntMapType.isValidValue(value), "value=" + value); } for (Object value : invalidValues) { assertFalse(intIntMapType.isValidValue(value), "value=" + value); } }