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