diff --git a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java index 2ee0ef893e7..4eecb9d575a 100644 --- a/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java +++ b/spring-webmvc/src/test/java/org/springframework/web/servlet/mvc/support/DefaultHandlerExceptionResolverTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -96,7 +96,8 @@ public class DefaultHandlerExceptionResolverTests { assertThat(mav).as("No ModelAndView returned").isNotNull(); assertThat(mav.isEmpty()).as("No Empty ModelAndView returned").isTrue(); assertThat(response.getStatus()).as("Invalid status code").isEqualTo(500); - assertThat(response.getErrorMessage()).isEqualTo("Missing URI template variable 'foo' for method parameter of type String"); + assertThat(response.getErrorMessage()) + .isEqualTo("Required URI template variable 'foo' for method parameter type String is not present"); } @Test @@ -106,7 +107,8 @@ public class DefaultHandlerExceptionResolverTests { assertThat(mav).as("No ModelAndView returned").isNotNull(); assertThat(mav.isEmpty()).as("No Empty ModelAndView returned").isTrue(); assertThat(response.getStatus()).as("Invalid status code").isEqualTo(400); - assertThat(response.getErrorMessage()).isEqualTo("Required bar parameter 'foo' is not present"); + assertThat(response.getErrorMessage()).isEqualTo( + "Required request parameter 'foo' for method parameter type bar is not present"); } @Test