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); } }