FilteredHttpResponse implements ForwardingHttpResponse { @Override public String getBodyAsString() throws IOException { return bodyFilter.filter(response.getContentType(), response.getBodyAsString()); }  @Override HttpResponse delegate(); @Override HttpHeaders getHeaders(); @Override HttpResponse withBody(); @Override HttpResponse withoutBody(); @Override byte[] getBody(); @Override String getBodyAsString();  }
@Test void shouldFilterBody() throws IOException { assertThat(unit.getBodyAsString(), is("My secret is f4k3")); }