@Test public void verify_non_header_wrapper_methods_pass_through_to_original_request() { doReturn(new HttpHeaders()).when(requestMock).getHeaders(); HttpRequestWrapperWithModifiableHeaders wrapper = new HttpRequestWrapperWithModifiableHeaders(requestMock); HttpRequest wrappedRequest = wrapper.getRequest(); URI wrapperUri = wrapper.getURI(); HttpMethod wrapperMethod = wrapper.getMethod(); assertThat(wrappedRequest).isSameAs(requestMock); assertThat(wrapperUri).isSameAs(uri); assertThat(wrapperMethod).isSameAs(wrapperMethod); verify(requestMock).getURI(); verify(requestMock).getMethod(); }
@Override public HttpHeaders getHeaders() { return modifiableHeaders; }
HttpRequestWrapperWithModifiableHeaders extends HttpRequestWrapper { @Override public HttpHeaders getHeaders() { return modifiableHeaders; } }
HttpRequestWrapperWithModifiableHeaders extends HttpRequestWrapper { @Override public HttpHeaders getHeaders() { return modifiableHeaders; } HttpRequestWrapperWithModifiableHeaders(HttpRequest request); }
HttpRequestWrapperWithModifiableHeaders extends HttpRequestWrapper { @Override public HttpHeaders getHeaders() { return modifiableHeaders; } HttpRequestWrapperWithModifiableHeaders(HttpRequest request); @Override HttpHeaders getHeaders(); }
HttpRequestWrapperWithModifiableHeaders extends HttpRequestWrapper { @Override public HttpHeaders getHeaders() { return modifiableHeaders; } HttpRequestWrapperWithModifiableHeaders(HttpRequest request); @Override HttpHeaders getHeaders();  }