SpringWebfluxClientRequestTagAdapter extends HttpTagAndSpanNamingAdapter<ClientRequest, ClientResponse> { @Override public @Nullable String getHeaderSingleValue(@Nullable ClientRequest request, @NotNull String headerKey) { if (request == null) { return null; } return request.headers().getFirst(headerKey); }  static SpringWebfluxClientRequestTagAdapter getDefaultInstance(); @Override @Nullable String getRequestUrl(@Nullable ClientRequest request); @Override @Nullable Integer getResponseHttpStatus(@Nullable ClientResponse response); @Override @Nullable String getRequestHttpMethod(@Nullable ClientRequest request); @Override @Nullable String getRequestPath(@Nullable ClientRequest request); @Override @Nullable String getRequestUriPathTemplate(
        @Nullable ClientRequest request,
        @Nullable ClientResponse response
    ); @Override @Nullable String getHeaderSingleValue(@Nullable ClientRequest request, @NotNull String headerKey); @Override @Nullable List<String> getHeaderMultipleValue(
        @Nullable ClientRequest request, @NotNull String headerKey
    ); @Override @Nullable String getSpanHandlerTagValue(
        @Nullable ClientRequest request, @Nullable ClientResponse response
    );  }
@Test public void getHeaderSingleValue_returns_result_of_calling_request_headers_getFirst() { String expectedHeaderValue = UUID.randomUUID().toString(); String headerKey = UUID.randomUUID().toString(); HttpHeaders headersMock = mock(HttpHeaders.class); doReturn(headersMock).when(requestMock).headers(); doReturn(expectedHeaderValue).when(headersMock).getFirst(headerKey); String result = implSpy.getHeaderSingleValue(requestMock, headerKey); assertThat(result).isEqualTo(expectedHeaderValue); verify(headersMock).getFirst(headerKey); }
@Test public void getHeaderSingleValue_returns_null_when_passed_null_request() { assertThat(implSpy.getHeaderSingleValue(null, "foo")).isNull(); }