FilteredHttpResponse implements ForwardingHttpResponse { @Override public HttpHeaders getHeaders() { return headerFilter.filter(response.getHeaders()); }  @Override HttpResponse delegate(); @Override HttpHeaders getHeaders(); @Override HttpResponse withBody(); @Override HttpResponse withoutBody(); @Override byte[] getBody(); @Override String getBodyAsString();  }
@Test void shouldFilterAuthorizationHeader() { assertThat(unit.getHeaders(), hasEntry(equalTo("Authorization"), contains("XXX"))); }
@Test void shouldNotFilterAcceptHeader() { assertThat(unit.getHeaders(), hasEntry(equalTo("Accept"), contains("text/plain"))); }