@Test
public void writesInputStreamToOutputStream() throws Exception {

    InputStream source = new ByteArrayInputStream(testContent);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    inputStreamEntityProvider.writeTo(source, InputStream.class, null, null, null, null, out);
    assertArrayEquals(testContent, out.toByteArray());
}