HttpClientHandler extends HttpHandler { public Span handleSendWithParent(HttpClientRequest request, @Nullable TraceContext parent) { if (request == null) throw new NullPointerException("request == null"); return handleSend(request, tracer.nextSpanWithParent(httpSampler, request, parent)); } HttpClientHandler(HttpTracing httpTracing, @Deprecated HttpClientAdapter<Req, Resp> adapter); static HttpClientHandler<HttpClientRequest, HttpClientResponse> create(
    HttpTracing httpTracing); @Deprecated static HttpClientHandler<Req, Resp> create(HttpTracing httpTracing,
    HttpClientAdapter<Req, Resp> adapter); Span handleSend(HttpClientRequest request); Span handleSendWithParent(HttpClientRequest request, @Nullable TraceContext parent); Span handleSend(HttpClientRequest request, Span span); @Deprecated Span handleSend(Injector<Req> injector, Req request); @Deprecated Span handleSend(Injector<C> injector, C carrier, Req request); @Deprecated Span handleSend(Injector<Req> injector, Req request, Span span); @Deprecated Span handleSend(Injector<C> injector, C carrier, Req request, Span span); @Deprecated Span nextSpan(Req request); @Deprecated void handleReceive(@Nullable Resp response, @Nullable Throwable error, Span span); void handleReceive(HttpClientResponse response, Span span);  }
@Test public void handleSendWithParent_overrideContext() { try ( CurrentTraceContext.Scope ws = httpTracing.tracing.currentTraceContext().newScope(context)) { brave.Span span = handler.handleSendWithParent(request, null); assertThat(span.context().parentIdAsLong()).isZero(); } }
@Test public void handleSendWithParent_overrideNull() { try (CurrentTraceContext.Scope ws = httpTracing.tracing.currentTraceContext().newScope(null)) { brave.Span span = handler.handleSendWithParent(request, context); assertThat(span.context().parentIdAsLong()).isEqualTo(context.spanId()); } }