@Test public void getHeaderMultipleValue_returns_result_of_calling_request_headers_getValuesAsList() { List<String> expectedHeaderValues = Arrays.asList(UUID.randomUUID().toString(), UUID.randomUUID().toString()); String headerKey = UUID.randomUUID().toString(); HttpHeaders headersMock = mock(HttpHeaders.class); doReturn(headersMock).when(requestMock).getHeaders(); doReturn(expectedHeaderValues).when(headersMock).getValuesAsList(headerKey); List<String> result = implSpy.getHeaderMultipleValue(requestMock, headerKey); assertThat(result).isEqualTo(expectedHeaderValues); verify(headersMock).getValuesAsList(headerKey); }
@Override public @Nullable List<String> getHeaderMultipleValue(@Nullable HttpRequest request, @NotNull String headerKey) { if (request == null) { return null; } return request.getHeaders().getValuesAsList(headerKey); }
SpringHttpClientTagAdapter extends HttpTagAndSpanNamingAdapter<HttpRequest, ClientHttpResponse> { @Override public @Nullable List<String> getHeaderMultipleValue(@Nullable HttpRequest request, @NotNull String headerKey) { if (request == null) { return null; } return request.getHeaders().getValuesAsList(headerKey); } }
SpringHttpClientTagAdapter extends HttpTagAndSpanNamingAdapter<HttpRequest, ClientHttpResponse> { @Override public @Nullable List<String> getHeaderMultipleValue(@Nullable HttpRequest request, @NotNull String headerKey) { if (request == null) { return null; } return request.getHeaders().getValuesAsList(headerKey); }  }
SpringHttpClientTagAdapter extends HttpTagAndSpanNamingAdapter<HttpRequest, ClientHttpResponse> { @Override public @Nullable List<String> getHeaderMultipleValue(@Nullable HttpRequest request, @NotNull String headerKey) { if (request == null) { return null; } return request.getHeaders().getValuesAsList(headerKey); }  @SuppressWarnings("unchecked") static SpringHttpClientTagAdapter getDefaultInstance(); @Override @Nullable String getRequestUrl(@Nullable HttpRequest request); @Override @Nullable Integer getResponseHttpStatus(@Nullable ClientHttpResponse response); @Override @Nullable String getRequestHttpMethod(@Nullable HttpRequest request); @Override @Nullable String getRequestUriPathTemplate(
        @Nullable HttpRequest request,
        @Nullable ClientHttpResponse response
    ); @Override @Nullable String getRequestPath(@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 ClientHttpResponse response); }
SpringHttpClientTagAdapter extends HttpTagAndSpanNamingAdapter<HttpRequest, ClientHttpResponse> { @Override public @Nullable List<String> getHeaderMultipleValue(@Nullable HttpRequest request, @NotNull String headerKey) { if (request == null) { return null; } return request.getHeaders().getValuesAsList(headerKey); }  @SuppressWarnings("unchecked") static SpringHttpClientTagAdapter getDefaultInstance(); @Override @Nullable String getRequestUrl(@Nullable HttpRequest request); @Override @Nullable Integer getResponseHttpStatus(@Nullable ClientHttpResponse response); @Override @Nullable String getRequestHttpMethod(@Nullable HttpRequest request); @Override @Nullable String getRequestUriPathTemplate(
        @Nullable HttpRequest request,
        @Nullable ClientHttpResponse response
    ); @Override @Nullable String getRequestPath(@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 ClientHttpResponse response);  }