diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java index 42a85569893..24c123dd29f 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/DispatcherHandlerErrorTests.java @@ -88,7 +88,8 @@ public class DispatcherHandlerErrorTests { StepVerifier.create(publisher) .consumeErrorWith(error -> { assertThat(error, instanceOf(ResponseStatusException.class)); - assertThat(error.getMessage(), is("Response status 404 with reason \"No matching handler\"")); + assertThat(error.getMessage(), + is("Response status 404 NOT_FOUND with reason \"No matching handler\"")); }) .verify(); } diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/InvocableHandlerMethodTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/InvocableHandlerMethodTests.java index 41204f70b50..b74fdcd2ab5 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/InvocableHandlerMethodTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/InvocableHandlerMethodTests.java @@ -176,7 +176,7 @@ public class InvocableHandlerMethodTests { fail("Expected UnsupportedMediaTypeStatusException"); } catch (UnsupportedMediaTypeStatusException ex) { - assertThat(ex.getMessage(), is("Response status 415 with reason \"boo\"")); + assertThat(ex.getMessage(), is("Response status 415 UNSUPPORTED_MEDIA_TYPE with reason \"boo\"")); } } diff --git a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java index af1f5443ee9..330274c64f7 100644 --- a/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java +++ b/spring-webflux/src/test/java/org/springframework/web/reactive/result/method/RequestMappingInfoHandlerMappingTests.java @@ -170,8 +170,8 @@ public class RequestMappingInfoHandlerMappingTests { Mono mono = this.handlerMapping.getHandler(exchange); assertError(mono, UnsupportedMediaTypeStatusException.class, - ex -> assertEquals("Response status 415 with reason \"Invalid mime type \"bogus\": " + - "does not contain '/'\"", ex.getMessage())); + ex -> assertEquals("Response status 415 UNSUPPORTED_MEDIA_TYPE with reason " + + "\"Invalid mime type \"bogus\": does not contain '/'\"", ex.getMessage())); } @Test // SPR-8462