### Question:
GenericLexer implements ImmutableIterator<CharSequence> { public void unparse() { unparsed = last; } GenericLexer(int poolCapacity); static CharSequence immutableOf(CharSequence value); static CharSequence assertNoDots(CharSequence value, int position); static CharSequence assertNoDotsAndSlashes(CharSequence value, int position); static CharSequence unquote(CharSequence value); final void defineSymbol(String token); CharSequence getContent(); int getPosition(); int getTokenHi(); CharSequence getUnparsed(); void goToPosition(int position, CharSequence unparsed); @Override boolean hasNext(); @Override CharSequence next(); CharSequence immutableBetween(int lo, int hi); int lastTokenPosition(); void of(CharSequence cs); void of(CharSequence cs, int lo, int hi); void restart(); void unparse(); static final LenComparator COMPARATOR; static final CharSequenceHashSet WHITESPACE; static final IntHashSet WHITESPACE_CH; }### Answer:
@Test public void testUnparse() { GenericLexer ts = new GenericLexer(64); ts.defineSymbol("+"); ts.defineSymbol("++"); ts.defineSymbol("*"); ts.of("+*a+b++blah-"); Iterator<CharSequence> it = ts.iterator(); while (it.hasNext()) { CharSequence e = it.next(); ts.unparse(); CharSequence a = it.next(); TestUtils.assertEquals(e, a); } }