ObjectMapperFactory implements Supplier<ObjectMapper> { public ObjectMapper get() { return MAPPER; }  ObjectMapper get();  }
@Test public void testConfigurationSettings() { ObjectMapper mapper = FACTORY.get(); SerializationConfig serializationConfig = mapper.getSerializationConfig(); DeserializationConfig deserializationConfig = mapper.getDeserializationConfig(); assertTrue(deserializationConfig .isEnabled(DeserializationFeature.READ_ENUMS_USING_TO_STRING)); assertTrue(deserializationConfig .isEnabled(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES)); assertTrue(deserializationConfig .isEnabled(DeserializationFeature.FAIL_ON_NUMBERS_FOR_ENUMS)); assertFalse(deserializationConfig .isEnabled(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)); assertTrue(serializationConfig .isEnabled(SerializationFeature.WRITE_ENUMS_USING_TO_STRING)); assertFalse(serializationConfig .isEnabled(SerializationFeature.WRITE_NULL_MAP_VALUES)); }
@Test public void testDateFormat() { ObjectMapper mapper = FACTORY.get(); assertTrue(mapper.getDateFormat() instanceof ISO8601DateFormat); }
@Test public void testSingleton() { assertSame(FACTORY.get(), FACTORY.get()); }