diff --git a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/HystrixGatewayFilterFactoryTests.java b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/HystrixGatewayFilterFactoryTests.java index 9ade48aff..19717dd0a 100644 --- a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/HystrixGatewayFilterFactoryTests.java +++ b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/HystrixGatewayFilterFactoryTests.java @@ -127,7 +127,7 @@ public class HystrixGatewayFilterFactoryTests extends BaseWebClientTests { testClient.get().uri("/delay/3").header("Host", "www.hystrixconnectfail.org") .accept(TEXT_HTML).exchange().expectStatus().is5xxServerError() .expectBody().consumeWith(res -> { - assertThat(res).isNotNull(); + assertThat(res.getResponseBody()).isNotNull(); String body = new String(res.getResponseBody(), UTF_8); assertThat(body).as( diff --git a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/SpringCloudCircuitBreakerFilterFactoryTests.java b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/SpringCloudCircuitBreakerFilterFactoryTests.java index 610a49e05..e876371ec 100644 --- a/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/SpringCloudCircuitBreakerFilterFactoryTests.java +++ b/spring-cloud-gateway-core/src/test/java/org/springframework/cloud/gateway/filter/factory/SpringCloudCircuitBreakerFilterFactoryTests.java @@ -95,7 +95,7 @@ public abstract class SpringCloudCircuitBreakerFilterFactoryTests .header("Host", "www.circuitbreakerconnectfail.org").accept(TEXT_HTML) .exchange().expectStatus().is5xxServerError().expectBody() .consumeWith(res -> { - assertThat(res).isNotNull(); + assertThat(res.getResponseBody()).isNotNull(); String body = new String(res.getResponseBody(), UTF_8); assertThat(body).as(