Buggy code:
public class Jackson2ObjectMapperFactoryBeanTests { private static final String DATE_FORMAT = "yyyy-MM-dd" ; private Jackson2ObjectMapperFactoryBean factory ; @ Before public void setUp ( ) { } @ Test public void settersWithNullValues ( ) { } @ Test ( expected = FatalBeanException . class ) public void unknownFeature ( ) { } @ Test public void booleanSetters ( ) { } @ Test public void setNotNullSerializationInclusion ( ) { } @ Test public void setNotDefaultSerializationInclusion ( ) { } @ Test public void setNotEmptySerializationInclusion ( ) { } @ Test public void dateTimeFormatSetter ( ) { } @ Test public void simpleDateFormatStringSetter ( ) { } @ Test public void setModules ( ) { } @ Test public void simpleSetup ( ) { } @ Test public void undefinedObjectType ( ) { } private static SerializerFactoryConfig getSerializerFactoryConfig ( ObjectMapper objectMapper ) { } private static DeserializerFactoryConfig getDeserializerFactoryConfig ( ObjectMapper objectMapper ) { } @ Test public void propertyNamingStrategy ( ) { } @ Test public void completeSetup ( ) { NopAnnotationIntrospector annotationIntrospector = NopAnnotationIntrospector . instance ; ObjectMapper objectMapper = new ObjectMapper ( ) ; factory . setObjectMapper ( objectMapper ) ; assertTrue ( this . factory . isSingleton ( ) ) ; assertEquals ( ObjectMapper . class , this . factory . getObjectType ( ) ) ; Map < Class < ? > , JsonDeserializer < ? > > deserializers = new HashMap < Class < ? > , JsonDeserializer < ? > > ( ) ; deserializers . put ( Date . class , new DateDeserializers . DateDeserializer ( ) ) ; JsonSerializer < Class < ? > > serializer1 = new ClassSerializer ( ) ; JsonSerializer < Number > serializer2 = new NumberSerializer ( ) ; factory . setSerializers ( serializer1 ) ; factory . setSerializersByType ( Collections . < Class < ? > , JsonSerializer < ? > > singletonMap ( Boolean . class , serializer2 ) ) ; factory . setDeserializersByType ( deserializers ) ; factory . setAnnotationIntrospector ( annotationIntrospector ) ; this . factory . setFeaturesToEnable ( SerializationFeature . FAIL_ON_EMPTY_BEANS , DeserializationFeature . UNWRAP_ROOT_VALUE , JsonParser . Feature . ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER , JsonGenerator . Feature . WRITE_NUMBERS_AS_STRINGS ) ; this . factory . setFeaturesToDisable ( MapperFeature . AUTO_DETECT_GETTERS , MapperFeature . AUTO_DETECT_FIELDS , JsonParser . Feature . AUTO_CLOSE_SOURCE , JsonGenerator . Feature . QUOTE_FIELD_NAMES ) ; assertFalse ( Jackson2ObjectMapperFactoryBeanTests . getSerializerFactoryConfig ( objectMapper ) . hasSerializers ( ) ) ; assertFalse ( Jackson2ObjectMapperFactoryBeanTests . getDeserializerFactoryConfig ( objectMapper ) . hasDeserializers ( ) ) ; this . factory . setSerializationInclusion ( JsonInclude . Include . NON_NULL ) ; this . factory . afterPropertiesSet ( ) ; assertTrue ( ( objectMapper == ( this . factory . getObject ( ) ) ) ) ; assertTrue ( Jackson2ObjectMapperFactoryBeanTests . getSerializerFactoryConfig ( objectMapper ) . hasSerializers ( ) ) ; assertTrue ( Jackson2ObjectMapperFactoryBeanTests . getDeserializerFactoryConfig ( objectMapper ) . hasDeserializers ( ) ) ; Serializers serializers = Jackson2ObjectMapperFactoryBeanTests . getSerializerFactoryConfig ( objectMapper ) . serializers ( ) . iterator ( ) . next ( ) ; assertTrue ( ( ( serializers . findSerializer ( null , SimpleType . construct ( Class . class ) , null ) ) == serializer1 ) ) ; assertTrue ( ( ( serializers . findSerializer ( null , SimpleType . construct ( Boolean . class ) , null ) ) == serializer2 ) ) ; assertNull ( serializers . findSerializer ( null , SimpleType . construct ( Number . class ) , null ) ) ; assertTrue ( ( annotationIntrospector == ( objectMapper . getSerializationConfig ( ) . getAnnotationIntrospector ( ) ) ) ) ; assertTrue ( ( annotationIntrospector == ( objectMapper . getDeserializationConfig ( ) . getAnnotationIntrospector ( ) ) ) ) ; assertTrue ( objectMapper . getSerializationConfig ( ) . isEnabled ( SerializationFeature . FAIL_ON_EMPTY_BEANS ) ) ; assertTrue ( objectMapper . getDeserializationConfig ( ) . isEnabled ( DeserializationFeature . UNWRAP_ROOT_VALUE ) ) ; assertTrue ( objectMapper . getFactory ( ) . isEnabled ( JsonParser . Feature . ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER ) ) ; assertTrue ( objectMapper . getFactory ( ) . isEnabled ( JsonGenerator . Feature . WRITE_NUMBERS_AS_STRINGS ) ) ; assertFalse ( objectMapper . getSerializationConfig ( ) . isEnabled ( MapperFeature . AUTO_DETECT_GETTERS ) ) ; <START_BUG> assertTrue ( objectMapper . getDeserializationConfig ( ) . isEnabled ( MapperFeature . DEFAULT_VIEW_INCLUSION ) ) ; <END_BUG> assertFalse ( objectMapper . getDeserializationConfig ( ) . isEnabled ( DeserializationFeature . FAIL_ON_UNKNOWN_PROPERTIES ) ) ; assertFalse ( objectMapper . getDeserializationConfig ( ) . isEnabled ( MapperFeature . AUTO_DETECT_FIELDS ) ) ; assertFalse ( objectMapper . getFactory ( ) . isEnabled ( JsonParser . Feature . AUTO_CLOSE_SOURCE ) ) ; assertFalse ( objectMapper . getFactory ( ) . isEnabled ( JsonGenerator . Feature . QUOTE_FIELD_NAMES ) ) ; assertTrue ( ( ( objectMapper . getSerializationConfig ( ) . getSerializationInclusion ( ) ) == ( JsonInclude . Include . NON_NULL ) ) ) ; } @ Test public void xmlMapper ( ) { } @ Test public void createXmlMapper ( ) { } }

Fix:
assertFalse ( objectMapper . getDeserializationConfig ( ) . isEnabled ( MapperFeature . DEFAULT_VIEW_INCLUSION ) ) ;