WingtipsApacheHttpClientUtil { public static String getFallbackSubspanSpanName(HttpRequest request) { RequestLine requestLine = request.getRequestLine(); return HttpRequestTracingUtils.getFallbackSpanNameForHttpRequest( "apachehttpclient_downstream_call", requestLine.getMethod() ); } @SuppressWarnings("WeakerAccess") protected  WingtipsApacheHttpClientUtil(); static void propagateTracingHeaders(HttpRequest request, Span span); static String getFallbackSubspanSpanName(HttpRequest request);  }
@DataProvider(value = { "someHttpMethod | apachehttpclient_downstream_call-someHttpMethod", "null | apachehttpclient_downstream_call-UNKNOWN_HTTP_METHOD", " | apachehttpclient_downstream_call-UNKNOWN_HTTP_METHOD", "[whitespace] | apachehttpclient_downstream_call-UNKNOWN_HTTP_METHOD", }, splitBy = "\\|") @Test public void getFallbackSubspanSpanName_works_as_expected(String httpMethod, String expectedResult) { if ("[whitespace]".equals(httpMethod)) { httpMethod = " \n\r\t "; } doReturn(httpMethod).when(requestLineMock).getMethod(); String result = WingtipsApacheHttpClientUtil.getFallbackSubspanSpanName(requestMock); assertThat(result).isEqualTo(expectedResult); }