@Test
void shouldNotReplaceWith() throws IOException {

    final BodyReplacer<HttpMessage> unit = replaceBody(m -> m.getContentType().startsWith("image/"), "<content>");
    final HttpMessage message = mock(HttpMessage.class);
    when(message.getContentType()).thenReturn("text/plain");
    when(message.getBodyAsString()).thenReturn("Hello, world!");
    final String body = unit.replace(message);
    assertThat(body, is(nullValue()));
}