ApacheHttpClientTagAdapter extends HttpTagAndSpanNamingAdapter<HttpRequest, HttpResponse> { @Override public @Nullable Integer getResponseHttpStatus(@Nullable HttpResponse response) { if (response == null) { return null; } StatusLine statusLine = response.getStatusLine(); if (statusLine == null) { return null; } return statusLine.getStatusCode(); }  @SuppressWarnings("unchecked") static ApacheHttpClientTagAdapter getDefaultInstance(); @Override @Nullable String getRequestPath(@Nullable HttpRequest request); @Override @Nullable Integer getResponseHttpStatus(@Nullable HttpResponse response); @Override @Nullable String getRequestHttpMethod(@Nullable HttpRequest request); @Override @Nullable String getRequestUriPathTemplate(@Nullable HttpRequest request, @Nullable HttpResponse response); @Override @Nullable String getRequestUrl(@Nullable HttpRequest request); @Override @Nullable String getHeaderSingleValue(@Nullable HttpRequest request, @NotNull String headerKey); @Override @Nullable List<String> getHeaderMultipleValue(@Nullable HttpRequest request, @NotNull String headerKey); @Override @Nullable String getSpanHandlerTagValue(@Nullable HttpRequest request, @Nullable HttpResponse response);  }
@DataProvider(value = { "HAPPY_PATH", "RESPONSE_OBJ_IS_NULL", "STATUS_LINE_IS_NULL" }) @Test public void getResponseHttpStatus_gets_status_code_from_given_response_StatusLine( GetResponseHttpStatusScenario scenario ) { Integer result = implSpy.getResponseHttpStatus(scenario.responseObjMock); assertThat(result).isEqualTo(scenario.expectedResult); }