Buggy code:
public class MvcNamespaceTests { public static final String VIEWCONTROLLER_BEAN_NAME = "org.springframework.web.servlet.config.viewControllerHandlerMapping" ; private GenericWebApplicationContext appContext ; private MvcNamespaceTests . TestController handler ; private HandlerMethod handlerMethod ; @ Before public void setUp ( ) throws Exception { } @ Test public void testDefaultConfig ( ) throws Exception { loadBeanDefinitions ( "mvc-config.xml" , 13 ) ; RequestMappingHandlerMapping mapping = appContext . getBean ( RequestMappingHandlerMapping . class ) ; assertNotNull ( mapping ) ; assertEquals ( 0 , mapping . getOrder ( ) ) ; assertTrue ( mapping . getUrlPathHelper ( ) . shouldRemoveSemicolonContent ( ) ) ; mapping . setDefaultHandler ( handlerMethod ) ; MockHttpServletRequest request = new MockHttpServletRequest ( "GET" , "//foo.json" ) ; NativeWebRequest webRequest = new org . springframework . web . context . request . ServletWebRequest ( request ) ; ContentNegotiationManager manager = mapping . getContentNegotiationManager ( ) ; assertEquals ( Arrays . asList ( APPLICATION_JSON ) , manager . resolveMediaTypes ( webRequest ) ) ; RequestMappingHandlerAdapter adapter = appContext . getBean ( RequestMappingHandlerAdapter . class ) ; assertNotNull ( adapter ) ; assertEquals ( false , new org . springframework . beans . DirectFieldAccessor ( adapter ) . getPropertyValue ( "ignoreDefaultModelOnRedirect" ) ) ; List < HttpMessageConverter < ? > > converters = adapter . getMessageConverters ( ) ; assertTrue ( ( ( converters . size ( ) ) > 0 ) ) ; for ( HttpMessageConverter < ? > converter : converters ) { if ( converter instanceof AbstractJackson2HttpMessageConverter ) { ObjectMapper objectMapper = ( ( AbstractJackson2HttpMessageConverter ) ( converter ) ) . getObjectMapper ( ) ; assertTrue ( objectMapper . getDeserializationConfig ( ) . isEnabled ( MapperFeature . DEFAULT_VIEW_INCLUSION ) ) ; assertTrue ( objectMapper . getSerializationConfig ( ) . isEnabled ( MapperFeature . DEFAULT_VIEW_INCLUSION ) ) ; <START_BUG> assertTrue ( objectMapper . getDeserializationConfig ( ) . isEnabled ( DeserializationFeature . FAIL_ON_UNKNOWN_PROPERTIES ) ) ; <END_BUG> if ( converter instanceof MappingJackson2XmlHttpMessageConverter ) { assertEquals ( XmlMapper . class , objectMapper . getClass ( ) ) ; } } } assertNotNull ( appContext . getBean ( FormattingConversionServiceFactoryBean . class ) ) ; assertNotNull ( appContext . getBean ( ConversionService . class ) ) ; assertNotNull ( appContext . getBean ( LocalValidatorFactoryBean . class ) ) ; assertNotNull ( appContext . getBean ( Validator . class ) ) ; request = new MockHttpServletRequest ( "GET" , "//" ) ; request . addParameter ( "date" , "2009-10-31" ) ; MockHttpServletResponse response = new MockHttpServletResponse ( ) ; HandlerExecutionChain chain = mapping . getHandler ( request ) ; assertEquals ( 1 , chain . getInterceptors ( ) . length ) ; assertTrue ( ( ( chain . getInterceptors ( ) [ 0 ] ) instanceof ConversionServiceExposingInterceptor ) ) ; ConversionServiceExposingInterceptor interceptor = ( ( ConversionServiceExposingInterceptor ) ( chain . getInterceptors ( ) [ 0 ] ) ) ; interceptor . preHandle ( request , response , handlerMethod ) ; assertSame ( appContext . getBean ( ConversionService . class ) , request . getAttribute ( ConversionService . class . getName ( ) ) ) ; adapter . handle ( request , response , handlerMethod ) ; assertTrue ( handler . recordedValidationError ) ; CompositeUriComponentsContributor uriComponentsContributor = this . appContext . getBean ( MVC_URI_COMPONENTS_CONTRIBUTOR_BEAN_NAME , CompositeUriComponentsContributor . class ) ; assertNotNull ( uriComponentsContributor ) ; } @ Test ( expected = TypeMismatchException . class ) public void testCustomConversionService ( ) throws Exception { } @ Test public void testCustomValidator ( ) throws Exception { } @ Test public void testCustomValidator32 ( ) throws Exception { } private void doTestCustomValidator ( String xml ) throws Exception { } @ Test public void testInterceptors ( ) throws Exception { } @ Test public void testResources ( ) throws Exception { } @ Test public void testResourcesWithOptionalAttributes ( ) throws Exception { } @ Test public void testResourcesWithResolversTransformers ( ) throws Exception { } @ Test public void testResourcesWithResolversTransformersCustom ( ) throws Exception { } @ Test public void testDefaultServletHandler ( ) throws Exception { } @ Test public void testDefaultServletHandlerWithOptionalAttributes ( ) throws Exception { } @ Test public void testBeanDecoration ( ) throws Exception { } @ Test public void testViewControllers ( ) throws Exception { } @ Test public void testViewControllersOnWebSphere ( ) throws Exception { } @ Test public void testViewControllersDefaultConfig ( ) { } @ Test public void testContentNegotiationManager ( ) throws Exception { } @ Test public void testAsyncSupportOptions ( ) throws Exception { } @ Test public void testViewResolution ( ) throws Exception { } @ Test public void testViewResolutionWithContentNegotiation ( ) throws Exception { } @ Test public void testPathMatchingHandlerMappings ( ) throws Exception { } private void loadBeanDefinitions ( String fileName , int expectedBeanCount ) { } @ Controller public static class TestController { private boolean recordedValidationError ; @ RequestMapping public void testBind ( @ RequestParam @ DateTimeFormat ( iso = ISO . DATE ) Date date , @ Validated ( MvcNamespaceTests . MyGroup . class ) MvcNamespaceTests . TestBean bean , BindingResult result ) { } } public static class TestValidator implements Validator { boolean validatorInvoked ; @ Override public boolean supports ( Class < ? > clazz ) { } @ Override public void validate ( Object target , Errors errors ) { } } @ Retention ( RetentionPolicy . RUNTIME ) public @ interface MyGroup { } private static class TestBean { @ NotNull ( groups = MvcNamespaceTests . MyGroup . class ) private String field ; @ SuppressWarnings ( "unused" ) public String getField ( ) { } @ SuppressWarnings ( "unused" ) public void setField ( String field ) { } } private static class TestMockServletContext extends MockServletContext { @ Override public RequestDispatcher getNamedDispatcher ( String path ) { } } public static class TestCallableProcessingInterceptor extends CallableProcessingInterceptorAdapter { } public static class TestDeferredResultProcessingInterceptor extends DeferredResultProcessingInterceptorAdapter { } public static class TestPathMatcher implements PathMatcher { @ Override public boolean isPattern ( String path ) { } @ Override public boolean match ( String pattern , String path ) { }

Fix:
assertFalse ( objectMapper . getDeserializationConfig ( ) . isEnabled ( DeserializationFeature . FAIL_ON_UNKNOWN_PROPERTIES ) ) ;