SpringWebfluxServerRequestTagAdapter extends HttpTagAndSpanNamingAdapter<ServerWebExchange, ServerHttpResponse> { @Override public @Nullable Integer getResponseHttpStatus(@Nullable ServerHttpResponse response) { if (response == null) { return null; } HttpStatus httpStatus = response.getStatusCode(); if (httpStatus == null) { return null; } return httpStatus.value(); }  static SpringWebfluxServerRequestTagAdapter getDefaultInstance(); @Override @Nullable String getErrorResponseTagValue(@Nullable ServerHttpResponse response); @Override @Nullable String getRequestUrl(@Nullable ServerWebExchange exchange); @Override @Nullable Integer getResponseHttpStatus(@Nullable ServerHttpResponse response); @Override @Nullable String getRequestHttpMethod(@Nullable ServerWebExchange exchange); @Override @Nullable String getRequestPath(@Nullable ServerWebExchange exchange); @Override @Nullable String getRequestUriPathTemplate(
        @Nullable ServerWebExchange exchange,
        @Nullable ServerHttpResponse response
    ); @Override @Nullable String getHeaderSingleValue(@Nullable ServerWebExchange exchange, @NotNull String headerKey); @Override @Nullable List<String> getHeaderMultipleValue(
        @Nullable ServerWebExchange exchange, @NotNull String headerKey
    ); @Override @Nullable String getSpanHandlerTagValue(
        @Nullable ServerWebExchange exchange, @Nullable ServerHttpResponse response
    );  }
@Test public void getResponseHttpStatus_works_as_expected() { HttpStatus expectedResult = HttpStatus.I_AM_A_TEAPOT; doReturn(expectedResult).when(responseMock).getStatusCode(); Integer result = adapterSpy.getResponseHttpStatus(responseMock); assertThat(result).isEqualTo(expectedResult.value()); }
@Test public void getResponseHttpStatus_returns_null_when_passed_null() { assertThat(adapterSpy.getResponseHttpStatus(null)).isNull(); }
@Test public void getResponseHttpStatus_returns_null_when_response_getStatusCode_returns_null() { doReturn(null).when(responseMock).getStatusCode(); assertThat(adapterSpy.getResponseHttpStatus(responseMock)).isNull(); }