// ------------------------------------------------------------------------
public void testReadNonEmpty() throws Exception {
ByteList list = new ArrayByteList();
for(int i = Byte.MIN_VALUE; i <= Byte.MAX_VALUE; i++) {
list.add((byte)i);
}
InputStream in = new ByteIteratorInputStream(list.iterator());
for(int i = Byte.MIN_VALUE; i <= Byte.MAX_VALUE; i++) {
assertEquals(0xFF&i,in.read());
}
assertEquals(-1,in.read());
assertEquals(-1,in.read());