@Test
public void testFullRead() throws IOException {

    byte[] buffer = new byte[10];
    InputStream testStream = new TestInputStream();
    Assert.assertEquals(10, StreamUtil.eagerRead(testStream, buffer));
    Assert.assertEquals(10, StreamUtil.eagerRead(testStream, buffer));
    Assert.assertEquals(5, StreamUtil.eagerRead(testStream, buffer));
    Assert.assertEquals(-1, StreamUtil.eagerRead(testStream, buffer));
    Assert.assertEquals(-1, StreamUtil.eagerRead(testStream, buffer));
}