@Test
public void testArrayZeroByteStream() throws Exception {

    byte[] s = IoUtils.toByteArray(new InputStream() {
        @Override
        public int read() throws IOException {
            return -1;
        }
    });
    assertEquals(0, s.length);
}