diff --git a/src/test/java/org/springframework/samples/petclinic/system/CrashControllerIntegrationTests.java b/src/test/java/org/springframework/samples/petclinic/system/CrashControllerIntegrationTests.java index 277401ade..37eb6ed38 100644 --- a/src/test/java/org/springframework/samples/petclinic/system/CrashControllerIntegrationTests.java +++ b/src/test/java/org/springframework/samples/petclinic/system/CrashControllerIntegrationTests.java @@ -17,7 +17,6 @@ package org.springframework.samples.petclinic.system; import static org.assertj.core.api.Assertions.assertThat; -import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.RANDOM_PORT; import java.util.List; @@ -84,7 +83,7 @@ class CrashControllerIntegrationTests { new HttpEntity<>(headers), String.class); assertThat(resp).isNotNull(); assertThat(resp.getStatusCode().is5xxServerError()); - assertNotNull(resp.getBody()); + assertThat(resp.getBody()).isNotNull(); // html: assertThat(resp.getBody()).containsSubsequence("", "

Something happened...

", "

Expected: controller used to showcase what happens when an exception is thrown

", "");