public void testReadAvailable() throws Exception {
BufferedTokenStream stream = new BufferedTokenStream(tokens.iterator());
assertEquals(tokens.get(0), stream.read());
assertEquals(tokens.get(1), stream.read());
assertTrue(stream.available());
stream.mark();
assertTrue(stream.available());
assertEquals(tokens.get(2), stream.read());
assertEquals(tokens.get(3), stream.read());
assertFalse(stream.available());
assertNull(stream.read());