@Test
public void testStreamToStreamForInputOutput() throws Exception {

    String test = "test";
    ByteArrayInputStream bais = new ByteArrayInputStream(test.getBytes());
    OutputStream baos = new ByteArrayOutputStream();
    Misc.streamToStream(bais, baos);
    assertEquals("test", baos.toString());
}