Buggy code:
public class RequestMappingHandlerMethodAdapterIntegrationTests { private final Object handler = new RequestMappingHandlerMethodAdapterIntegrationTests . Handler ( ) ; private RequestMappingHandlerMethodAdapter handlerAdapter ; private MockHttpServletRequest request ; private MockHttpServletResponse response ; @ Before public void setup ( ) throws Exception { } @ After public void teardown ( ) { } @ Test public void handleMvc ( ) throws Exception { } @ Test public void handleRequestBody ( ) throws Exception { } @ Test public void handleHttpEntity ( ) throws Exception { } private HandlerMethod handlerMethod ( String methodName , Class < ? > ... paramTypes ) throws Exception { } @ SuppressWarnings ( "unused" ) @ SessionAttributes ( types = TestBean . class ) private static class Handler { @ InitBinder ( "dateParam" ) public void initBinder ( WebDataBinder dataBinder , @ RequestParam ( "datePattern" ) String datePattern ) { } @ ModelAttribute public void model ( Model model ) { } public String handleMvc ( @ CookieValue ( "cookie" ) int cookie , @ PathVariable ( "pathvar" ) String pathvar , @ RequestHeader ( "header" ) String header , @ RequestHeader ( defaultValue = "#{systemProperties.systemHeader}" ) String systemHeader , @ RequestHeader Map < String , Object > headerMap , @ RequestParam ( "dateParam" ) Date dateParam , @ RequestParam Map < String , Object > paramMap , String paramByConvention , @ Value ( "#{request.contextPath}" ) String value , @ ModelAttribute ( "modelAttr" ) @ Valid TestBean modelAttr , Errors errors , TestBean modelAttrByConvention , Color customArg , HttpServletRequest request , HttpServletResponse response , RequestMappingHandlerMethodAdapterIntegrationTests . User user , @ ModelAttribute RequestMappingHandlerMethodAdapterIntegrationTests . OtherUser otherUser , Model model ) throws Exception { <START_BUG> model . addAttribute ( "cookie" , cookie ) . addAttribute ( "pathvar" , pathvar ) . addAttribute ( "header" , header ) . addAttribute ( "systemHeader" , systemHeader ) . addAttribute ( "headerMap" , headerMap ) . addAttribute ( "dateParam" , dateParam ) . addAttribute ( "paramMap" , paramMap ) . addAttribute ( "paramByConvention" , paramByConvention ) . addAttribute ( "value" , value ) . addAttribute ( "customArg" , customArg ) . addAttribute ( user ) ; <END_BUG> assertNotNull ( request ) ; assertNotNull ( response ) ; return "viewName" ; } @ ResponseStatus ( HttpStatus . ACCEPTED ) @ ResponseBody public String handleRequestBody ( @ RequestBody byte [ ] bytes ) throws Exception { } public ResponseEntity < String > handleHttpEntity ( HttpEntity < byte [ ] > httpEntity ) throws Exception { } } private static class StubValidator implements Validator { public boolean supports ( Class < ? > clazz ) { } public void validate ( Object target , Errors errors ) { } } private static class ColorArgumentResolver implements WebArgumentResolver { public Object resolveArgument ( MethodParameter methodParameter , NativeWebRequest webRequest ) throws Exception { } } private static class User implements Principal { public String getName ( ) { } } private static class OtherUser implements Principal { public String getName ( ) { } } }

Fix:
model . addAttribute ( "cookie" , cookie ) . addAttribute ( "header" , header ) . addAttribute ( "systemHeader" , systemHeader ) . addAttribute ( "headerMap" , headerMap ) . addAttribute ( "dateParam" , dateParam ) . addAttribute ( "paramMap" , paramMap ) . addAttribute ( "paramByConvention" , paramByConvention ) . addAttribute ( "value" , value ) . addAttribute ( "customArg" , customArg ) . addAttribute ( user ) ;