From bd7d324cdc62fb2c1fc7a2f49c4c3db33ac62116 Mon Sep 17 00:00:00 2001 From: Jonas Kunz Date: Tue, 28 Nov 2023 15:32:03 +0100 Subject: [PATCH] Fix test mocking --- .../co/elastic/apm/agent/webfluxcommon/SpringWeb5UtilsTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common-spring5/src/test/java/co/elastic/apm/agent/webfluxcommon/SpringWeb5UtilsTest.java b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common-spring5/src/test/java/co/elastic/apm/agent/webfluxcommon/SpringWeb5UtilsTest.java index 5910064583..5d0e524d2d 100644 --- a/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common-spring5/src/test/java/co/elastic/apm/agent/webfluxcommon/SpringWeb5UtilsTest.java +++ b/apm-agent-plugins/apm-spring-webflux/apm-spring-webflux-common-spring5/src/test/java/co/elastic/apm/agent/webfluxcommon/SpringWeb5UtilsTest.java @@ -45,7 +45,7 @@ void testWrongResponseType() { @Test void testGetClientStatusCode() throws Exception { ClientResponse mockResponse = mock(ClientResponse.class); - doReturn(HttpStatus.IM_USED).when(mockResponse).statusCode(); + doReturn(226).when(mockResponse).rawStatusCode(); assertThat(SpringWebVersionUtils.getClientStatusCode(mockResponse)).isEqualTo(226); } }