@Test
public void shouldCreateAnObjectMapperWithGivenConfig(){

    Map<DeserializationConfig.Feature, Boolean> deserialization = new HashMap<DeserializationConfig.Feature, Boolean>();
    Map<SerializationConfig.Feature, Boolean> serialization = new HashMap<SerializationConfig.Feature, Boolean>();
    deserialization.put(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES, true);
    deserialization.put(DeserializationConfig.Feature.AUTO_DETECT_SETTERS, false);
    serialization.put(SerializationConfig.Feature.AUTO_DETECT_IS_GETTERS, false);
    serialization.put(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS, false);
    when(mockCRestConfig.get(eq(JacksonFactoryTest.class.getName() + JacksonFactory.JACKSON_DESERIALIZER_CONFIG), any(Object.class))).thenReturn(deserialization);
    when(mockCRestConfig.get(eq(JacksonFactoryTest.class.getName() + JacksonFactory.JACKSON_SERIALIZER_CONFIG), any(Object.class))).thenReturn(serialization);
    ObjectMapper actual = JacksonFactory.createObjectMapper(mockCRestConfig, getClass());
    assertNotNull(actual);
    assertTrue(actual.getDeserializationConfig().isEnabled(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES));
    assertFalse(actual.getDeserializationConfig().isEnabled(DeserializationConfig.Feature.AUTO_DETECT_SETTERS));
    assertFalse(actual.getSerializationConfig().isEnabled(SerializationConfig.Feature.AUTO_DETECT_IS_GETTERS));
    assertFalse(actual.getSerializationConfig().isEnabled(SerializationConfig.Feature.FAIL_ON_EMPTY_BEANS));
}