WingtipsHttpClientBuilder extends HttpClientBuilder { protected @NotNull String getSubspanSpanName( @NotNull HttpRequest request, @NotNull HttpTagAndSpanNamingStrategy<HttpRequest, ?> namingStrategy, @NotNull HttpTagAndSpanNamingAdapter<HttpRequest, ?> adapter ) { String subspanNameFromStrategy = namingStrategy.getInitialSpanName(request, adapter); if (StringUtils.isNotBlank(subspanNameFromStrategy)) { return subspanNameFromStrategy; } return WingtipsApacheHttpClientUtil.getFallbackSubspanSpanName(request); } WingtipsHttpClientBuilder();  WingtipsHttpClientBuilder(boolean surroundCallsWithSubspan);  WingtipsHttpClientBuilder(
        boolean surroundCallsWithSubspan,
        HttpTagAndSpanNamingStrategy<HttpRequest, HttpResponse> tagAndNamingStrategy,
        HttpTagAndSpanNamingAdapter<HttpRequest, HttpResponse> tagAndNamingAdapter
    ); static WingtipsHttpClientBuilder create(); static WingtipsHttpClientBuilder create(boolean surroundCallsWithSubspan); static WingtipsHttpClientBuilder create(
        boolean surroundCallsWithSubspan,
        HttpTagAndSpanNamingStrategy<HttpRequest, HttpResponse> tagAndNamingStrategy,
        HttpTagAndSpanNamingAdapter<HttpRequest, HttpResponse> tagAndNamingAdapter
    ); boolean isSurroundCallsWithSubspan(); WingtipsHttpClientBuilder setSurroundCallsWithSubspan(boolean surroundCallsWithSubspan);  }
@DataProvider(value = { "spanNameFromStrategy | someHttpMethod | spanNameFromStrategy", "null | someHttpMethod | apachehttpclient_downstream_call-someHttpMethod", " | someHttpMethod | apachehttpclient_downstream_call-someHttpMethod", "[whitespace] | someHttpMethod | apachehttpclient_downstream_call-someHttpMethod", "null | null | apachehttpclient_downstream_call-UNKNOWN_HTTP_METHOD", "null | | apachehttpclient_downstream_call-UNKNOWN_HTTP_METHOD", "null | [whitespace] | apachehttpclient_downstream_call-UNKNOWN_HTTP_METHOD", }, splitBy = "\\|") @Test public void getSubspanSpanName_works_as_expected(String strategyResult, String httpMethod, String expectedResult) { if ("[whitespace]".equals(strategyResult)) { strategyResult = " \n\r\t "; } if ("[whitespace]".equals(httpMethod)) { httpMethod = " \n\r\t "; } initialSpanNameFromStrategy.set(strategyResult); doReturn(httpMethod).when(requestLineMock).getMethod(); String result = builder.getSubspanSpanName(requestMock, tagAndNamingStrategy, tagAndNamingAdapterMock); assertThat(result).isEqualTo(expectedResult); }