diff --git a/spring-web/src/test/java/org/springframework/http/server/reactive/CookieIntegrationTests.java b/spring-web/src/test/java/org/springframework/http/server/reactive/CookieIntegrationTests.java index 8bc6f77a7d8..9d824baf03c 100644 --- a/spring-web/src/test/java/org/springframework/http/server/reactive/CookieIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/http/server/reactive/CookieIntegrationTests.java @@ -92,7 +92,7 @@ class CookieIntegrationTests extends AbstractHttpHandlerIntegrationTests { public void cookiesWithSameNameTest(HttpServer httpServer) throws Exception { startServer(httpServer); - ResponseEntity response = getRestClient().get() + getRestClient().get() .header("Cookie", "SID=31d4d96e407aad42; lang=en-US; lang=zh-CN") .retrieve().toBodilessEntity(); diff --git a/spring-web/src/test/java/org/springframework/web/client/RestTemplateIntegrationTests.java b/spring-web/src/test/java/org/springframework/web/client/RestTemplateIntegrationTests.java index b469b294975..42903d2d582 100644 --- a/spring-web/src/test/java/org/springframework/web/client/RestTemplateIntegrationTests.java +++ b/spring-web/src/test/java/org/springframework/web/client/RestTemplateIntegrationTests.java @@ -241,8 +241,8 @@ class RestTemplateIntegrationTests extends AbstractMockWebServerTests { setUpClient(clientHttpRequestFactory); String url = baseUrl + "/status/notfound"; - assertThatExceptionOfType(HttpClientErrorException.class).isThrownBy(() -> - template.execute(url, HttpMethod.GET, null, null)) + assertThatExceptionOfType(HttpClientErrorException.class) + .isThrownBy(() -> template.execute(url, HttpMethod.GET, null, null)) .satisfies(ex -> { assertThat(ex.getStatusCode()).isEqualTo(HttpStatus.NOT_FOUND); assertThat(ex.getStatusText()).isNotNull(); @@ -260,8 +260,8 @@ class RestTemplateIntegrationTests extends AbstractMockWebServerTests { setUpClient(clientHttpRequestFactory); String url = baseUrl + "/status/badrequest"; - assertThatExceptionOfType(HttpClientErrorException.class).isThrownBy(() -> - template.execute(url, HttpMethod.GET, null, null)) + assertThatExceptionOfType(HttpClientErrorException.class) + .isThrownBy(() -> template.execute(url, HttpMethod.GET, null, null)) .satisfies(ex -> { assertThat(ex.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); assertThat(ex.getMessage()).containsSubsequence("400", "on GET request for \""+url+ "\": [no body]"); @@ -276,8 +276,8 @@ class RestTemplateIntegrationTests extends AbstractMockWebServerTests { setUpClient(clientHttpRequestFactory); String url = baseUrl + "/status/server"; - assertThatExceptionOfType(HttpServerErrorException.class).isThrownBy(() -> - template.execute(url, HttpMethod.GET, null, null)) + assertThatExceptionOfType(HttpServerErrorException.class) + .isThrownBy(() -> template.execute(url, HttpMethod.GET, null, null)) .satisfies(ex -> { assertThat(ex.getStatusCode()).isEqualTo(HttpStatus.INTERNAL_SERVER_ERROR); assertThat(ex.getStatusText()).isNotNull();