### Question:
CharacterReader { void unconsume() { pos--; } CharacterReader(String input); @Override String toString();  }### Answer:
@Test public void unconsume() { CharacterReader r = new CharacterReader("one"); assertEquals('o', r.consume()); assertEquals('n', r.current()); r.unconsume(); assertEquals('o', r.current()); assertEquals('o', r.consume()); assertEquals('n', r.consume()); assertEquals('e', r.consume()); assertTrue(r.isEmpty()); r.unconsume(); assertFalse(r.isEmpty()); assertEquals('e', r.current()); assertEquals('e', r.consume()); assertTrue(r.isEmpty()); assertEquals(CharacterReader.EOF, r.consume()); r.unconsume(); assertTrue(r.isEmpty()); assertEquals(CharacterReader.EOF, r.current()); }