ServletRequestTagAdapter extends HttpTagAndSpanNamingAdapter<HttpServletRequest, HttpServletResponse> { @Override public @Nullable String getRequestPath(@Nullable HttpServletRequest request) { if (request == null) { return null; } return request.getRequestURI(); }  @SuppressWarnings("unchecked") static ServletRequestTagAdapter getDefaultInstance(); @Override @Nullable String getErrorResponseTagValue(@Nullable HttpServletResponse response); @Override @Nullable String getRequestUrl(@Nullable HttpServletRequest request); @Override @Nullable Integer getResponseHttpStatus(@Nullable HttpServletResponse response); @Override @Nullable String getRequestHttpMethod(@Nullable HttpServletRequest request); @Override @Nullable String getRequestPath(@Nullable HttpServletRequest request); @Override @Nullable String getRequestUriPathTemplate(
        @Nullable HttpServletRequest request,
        @Nullable HttpServletResponse response
    ); @Override @Nullable String getHeaderSingleValue(@Nullable HttpServletRequest request, @NotNull String headerKey); @Override @Nullable List<String> getHeaderMultipleValue(
        @Nullable HttpServletRequest request, @NotNull String headerKey
    ); @Override @Nullable String getSpanHandlerTagValue(
        @Nullable HttpServletRequest request, @Nullable HttpServletResponse response
    );  }
@Test public void getRequestPath_works_as_expected() { String expectedResult = UUID.randomUUID().toString(); doReturn(expectedResult).when(requestMock).getRequestURI(); String result = adapterSpy.getRequestPath(requestMock); assertThat(result).isEqualTo(expectedResult); }
@Test public void getRequestPath_returns_null_if_passed_null() { assertThat(adapterSpy.getRequestPath(null)).isNull(); }