assertEquals(0, s.available());
}
@Test
public void testBasicsReadArray() throws IOException {
ExactSizeInputStream s = new ExactSizeInputStream(byteStream("hello"), 3);
assertEquals(3, s.available());
byte[] buf = new byte[10];
assertEquals(2, s.read(buf, 0, 2));
assertEquals('h', buf[0]);
assertEquals('e', buf[1]);
assertEquals(1, s.read(buf, 0, 2));
assertEquals('l', buf[0]);
assertEquals(-1, s.read(buf, 0, 2));
}