SpringHttpClientTagAdapter extends HttpTagAndSpanNamingAdapter<HttpRequest, ClientHttpResponse> { @Override public @Nullable String getRequestPath(@Nullable HttpRequest request) { if (request == null) { return null; } return request.getURI().getPath(); }  @SuppressWarnings("unchecked") static SpringHttpClientTagAdapter getDefaultInstance(); @Override @Nullable String getRequestUrl(@Nullable HttpRequest request); @Override @Nullable Integer getResponseHttpStatus(@Nullable ClientHttpResponse response); @Override @Nullable String getRequestHttpMethod(@Nullable HttpRequest request); @Override @Nullable String getRequestUriPathTemplate(
        @Nullable HttpRequest request,
        @Nullable ClientHttpResponse response
    ); @Override @Nullable String getRequestPath(@Nullable HttpRequest request); @Override @Nullable String getHeaderSingleValue(@Nullable HttpRequest request, @NotNull String headerKey); @Override @Nullable List<String> getHeaderMultipleValue(@Nullable HttpRequest request, @NotNull String headerKey); @Override @Nullable String getSpanHandlerTagValue(@Nullable HttpRequest request, @Nullable ClientHttpResponse response);  }
@Test public void getRequestPath_returns_request_URI_path() { String expectedPath = "/foo/bar/" + UUID.randomUUID().toString(); URI fullUri = URI.create(expectedPath + "?stuff=things"); doReturn(fullUri).when(requestMock).getURI(); assertThat(fullUri.toString()).contains("?"); assertThat(expectedPath).doesNotContain("?"); assertThat(fullUri.getPath()).isEqualTo(expectedPath); String result = implSpy.getRequestPath(requestMock); assertThat(result).isEqualTo(expectedPath); }
@Test public void getRequestPath_returns_null_when_passed_null() { assertThat(implSpy.getRequestPath(null)).isNull(); }