}
@Test
public void testDynamicPushbackInputStream() throws Exception {
ByteArrayInputStream in = new ByteArrayInputStream(new byte[] {0x01, 0x02, 0x03, 0x04});
DynamicPushbackInputStream dpis = new DynamicPushbackInputStream(in);
int r = dpis.read();
dpis.unread(r);
int e = dpis.read();
assertEquals(r, e);
dpis.unread(e);
dpis.clear();
r = dpis.read();
assertFalse(e == r);
}