@Test
public void shouldCopyStreams() throws IOException {

    String input = "image/jpeg jPEG jPG jPE";
    InputStream in = new ByteArrayInputStream(input.getBytes(StandardCharsets.UTF_8));
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    IOUtilities.copyStreams(in, out);
    assertThat(out.toString(), is(input));
}