SpringWebfluxServerRequestTagAdapter extends HttpTagAndSpanNamingAdapter<ServerWebExchange, ServerHttpResponse> { @Override public @Nullable String getRequestUrl(@Nullable ServerWebExchange exchange) { if (exchange == null || exchange.getRequest() == null) { return null; } return exchange.getRequest().getURI().toString(); }  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 getRequestUrl_returns_request_URI_toString() { URI expectedFullUri = URI.create("http: doReturn(expectedFullUri).when(requestMock).getURI(); String result = adapterSpy.getRequestUrl(exchangeMock); assertThat(result).isEqualTo(expectedFullUri.toString()); }
@Test public void getRequestUrl_returns_null_when_passed_null_exchange() { assertThat(adapterSpy.getRequestUrl(null)).isNull(); }
@Test public void getRequestUrl_returns_null_when_exchange_request_is_null() { doReturn(null).when(exchangeMock).getRequest(); assertThat(adapterSpy.getRequestUrl(exchangeMock)).isNull(); }