diff --git a/src/test/java/se/citerus/dddsample/interfaces/tracking/ws/CargoTrackingRestServiceIntegrationTest.java b/src/test/java/se/citerus/dddsample/interfaces/tracking/ws/CargoTrackingRestServiceIntegrationTest.java index 82e19d61d..a0fd86f2e 100644 --- a/src/test/java/se/citerus/dddsample/interfaces/tracking/ws/CargoTrackingRestServiceIntegrationTest.java +++ b/src/test/java/se/citerus/dddsample/interfaces/tracking/ws/CargoTrackingRestServiceIntegrationTest.java @@ -3,6 +3,8 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; +import org.skyscreamer.jsonassert.JSONAssert; +import org.skyscreamer.jsonassert.JSONCompareMode; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.web.server.LocalServerPort; import org.springframework.http.RequestEntity; @@ -49,7 +51,7 @@ void shouldReturn200ResponseAndJsonWhenRequestingCargoWithIdABC123() throws Exce assertThat(response.getStatusCode().value()).isEqualTo(200); String expected = StreamUtils.copyToString(getClass().getResourceAsStream("/sampleCargoTrackingResponse.json"), StandardCharsets.UTF_8); assertThat(response.getHeaders().get("Content-Type")).containsExactly("application/json"); - assertThat(response.getBody()).isEqualTo(expected); + JSONAssert.assertEquals(expected, response.getBody(), JSONCompareMode.STRICT); } @Test