HttpServletAdapter extends HttpServerAdapter<HttpServletRequest, HttpServletResponse> { @Override public String url(HttpServletRequest request) { StringBuffer url = request.getRequestURL(); if (request.getQueryString() != null && !request.getQueryString().isEmpty()) { url.append('?').append(request.getQueryString()); } return url.toString(); }  HttpServletResponse adaptResponse(HttpServletRequest req, HttpServletResponse resp); @Override boolean parseClientIpAndPort(HttpServletRequest req, Span span); @Override String method(HttpServletRequest request); @Override String path(HttpServletRequest request); @Override String url(HttpServletRequest request); @Override String requestHeader(HttpServletRequest request, String name); @Override String methodFromResponse(HttpServletResponse response); @Override String route(HttpServletResponse response); @Override @Nullable Integer statusCode(HttpServletResponse response); @Override int statusCodeAsInt(HttpServletResponse response);  }
@Test public void url_derivedFromUrlAndQueryString() { when(request.getRequestURL()).thenReturn(new StringBuffer("http: when(request.getQueryString()).thenReturn("hello=world"); assertThat(adapter.url(request)) .isEqualTo("http: }