}
public void testEmitFallThroughTokens() throws Exception {
ByteArrayInputStream stream = new ByteArrayInputStream("foo,bar,foo}".getBytes());
TokenEmitter emitter = new TokenEmitter(new BufferedInputStream(stream), new Token[]{
ConcreteToken.from("}"),
});
assertTrue(emitter.hasNext());
assertEquals(ConcreteToken.from("foo,bar,foo"), emitter.next());
assertTrue(emitter.hasNext());
assertEquals(ConcreteToken.from("}"), emitter.next());
assertFalse(emitter.hasNext());
}