diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java index 3fc672d34e..5f95b61c2b 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/reactive/server/AbstractReactiveWebServerFactoryTests.java @@ -469,7 +469,7 @@ public abstract class AbstractReactiveWebServerFactoryTests { try { ContentResponse response = client.POST("http://localhost:" + this.webServer.getPort()) .content(new StringContentProvider("Hello World"), "text/plain").send(); - assertThat(response.getStatus() == HttpStatus.OK.value()); + assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); assertThat(response.getContentAsString()).isEqualTo("Hello World"); } finally { diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java index 07ddcc8098..397658fd40 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/servlet/server/AbstractServletWebServerFactoryTests.java @@ -1139,7 +1139,8 @@ public abstract class AbstractServletWebServerFactoryTests { client.start(); try { ContentResponse response = client.GET("http://localhost:" + this.webServer.getPort() + "/hello"); - assertThat(response.getStatus() == HttpStatus.OK.value()); + assertThat(response.getStatus()).isEqualTo(HttpStatus.OK.value()); + assertThat(response.getContentAsString()).isEqualTo("Hello World"); } finally { client.stop();