Polishing

This commit is contained in:
Sam Brannen
2026-04-02 12:43:28 +02:00
parent b6fc3a1b6f
commit 24c7d31ba7
2 changed files with 7 additions and 7 deletions
@@ -92,7 +92,7 @@ class CookieIntegrationTests extends AbstractHttpHandlerIntegrationTests {
public void cookiesWithSameNameTest(HttpServer httpServer) throws Exception {
startServer(httpServer);
ResponseEntity<Void> response = getRestClient().get()
getRestClient().get()
.header("Cookie", "SID=31d4d96e407aad42; lang=en-US; lang=zh-CN")
.retrieve().toBodilessEntity();
@@ -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();