@Test
public void testReadToEnd() throws IOException {

    final InputStream in = new ByteArrayInputStream(makeBytes(10000));
    B2IoUtils.readToEnd(in);
    // verify we're at the end.
    assertEquals(-1, in.read());
    // close the stream.  there shouldn't be any exceptions.
    in.close();
}