### Question:
DefaultAtlasConversionService implements AtlasConversionService { @Override public Boolean isPrimitive(String className) { if (className == null) { return false; } if (PRIMITIVE_CLASSNAMES.contains(className)) { return true; } return false; } private  DefaultAtlasConversionService(); static DefaultAtlasConversionService getInstance(); static Set<String> listPrimitiveClassNames(); @Override Optional<AtlasConverter<?>> findMatchingConverter(FieldType source, FieldType target); @Override Optional<AtlasConverter<?>> findMatchingConverter(String sourceClassName, String targetClassName); @Override Object copyPrimitive(Object sourceValue); @Override Object convertType(Object sourceValue, FieldType origSourceType, FieldType targetType); @Override Object convertType(Object sourceValue, String sourceFormat, FieldType targetType, String targetFormat); @Override Object convertType(Object sourceValue, String sourceFormat, Class<?> targetType, String targetFormat); @Override boolean isConvertionAvailableFor(Object sourceValue, Class<?> targetType); @Override Boolean isPrimitive(String className); @Override Boolean isPrimitive(Class<?> clazz); @Override Boolean isPrimitive(FieldType fieldType); @Override Boolean isBoxedPrimitive(Class<?> clazz); @Override Class<?> boxOrUnboxPrimitive(String clazzName); @Override Class<?> boxOrUnboxPrimitive(Class<?> clazz); @Override FieldType fieldTypeFromClass(Class<?> clazz); @Override FieldType fieldTypeFromClass(String className); @Override Class<?> classFromFieldType(FieldType fieldType); @Override Boolean isAssignableFieldType(FieldType source, FieldType target);  }### Answer:
@Test public void testIsPrimitiveClass() { assertTrue(service.isPrimitive(boolean.class)); assertTrue(service.isPrimitive(byte.class)); assertTrue(service.isPrimitive(char.class)); assertTrue(service.isPrimitive(double.class)); assertTrue(service.isPrimitive(float.class)); assertTrue(service.isPrimitive(int.class)); assertTrue(service.isPrimitive(long.class)); assertTrue(service.isPrimitive(short.class)); assertFalse(service.isPrimitive(Boolean.class)); assertFalse(service.isPrimitive(Byte.class)); assertFalse(service.isPrimitive(Character.class)); assertFalse(service.isPrimitive(Double.class)); assertFalse(service.isPrimitive(Float.class)); assertFalse(service.isPrimitive(Integer.class)); assertFalse(service.isPrimitive(Long.class)); assertFalse(service.isPrimitive(Short.class)); assertFalse(service.isPrimitive(String.class)); assertFalse(service.isPrimitive(AtlasMapping.class)); assertFalse(service.isPrimitive(List.class)); assertFalse(service.isPrimitive((Class<?>) null)); }
@Test public void testIsPrimitiveFieldType() { assertTrue(service.isPrimitive(FieldType.BOOLEAN)); assertTrue(service.isPrimitive(FieldType.BYTE)); assertTrue(service.isPrimitive(FieldType.CHAR)); assertTrue(service.isPrimitive(FieldType.DECIMAL)); assertTrue(service.isPrimitive(FieldType.DOUBLE)); assertTrue(service.isPrimitive(FieldType.FLOAT)); assertTrue(service.isPrimitive(FieldType.INTEGER)); assertTrue(service.isPrimitive(FieldType.LONG)); assertTrue(service.isPrimitive(FieldType.SHORT)); assertTrue(service.isPrimitive(FieldType.STRING)); assertFalse(service.isPrimitive(FieldType.ANY)); assertFalse(service.isPrimitive(FieldType.BYTE_ARRAY)); assertFalse(service.isPrimitive(FieldType.COMPLEX)); assertFalse(service.isPrimitive(FieldType.DATE)); assertFalse(service.isPrimitive(FieldType.DATE_TIME)); assertFalse(service.isPrimitive(FieldType.DATE_TIME_TZ)); assertFalse(service.isPrimitive(FieldType.DATE_TZ)); assertFalse(service.isPrimitive(FieldType.TIME)); assertFalse(service.isPrimitive(FieldType.TIME_TZ)); assertFalse(service.isPrimitive((FieldType) null)); }
@Test public void testIsPrimitive() { assertTrue(service.isPrimitive("short")); String s = null; assertFalse(service.isPrimitive(s)); assertFalse(service.isPrimitive("String")); }