HttpParser { public <Req> void request(HttpAdapter<Req, ?> adapter, Req req, SpanCustomizer customizer) { String name = spanName(adapter, req); if (name != null) customizer.name(name); String method = adapter.method(req); if (method != null) customizer.tag("http.method", method); String path = adapter.path(req); if (path != null) customizer.tag("http.path", path); }  void request(HttpAdapter<Req, ?> adapter, Req req, SpanCustomizer customizer); void response(HttpAdapter<?, Resp> adapter, @Nullable Resp res,
    @Nullable Throwable error, SpanCustomizer customizer);  }
@Test public void request_addsMethodAndPath() { when(adapter.method(request)).thenReturn("GET"); when(adapter.path(request)).thenReturn("/foo"); parser.request(adapter, request, customizer); verify(customizer).tag("http.method", "GET"); verify(customizer).tag("http.path", "/foo"); }
@Test public void request_doesntCrashOnNullPath() { parser.request(adapter, request, customizer); verify(customizer, never()).tag("http.path", null); }