InputTextReader { public char read() { char chr = _content.charAt(_index++); return CharUtils.isWhiteSpace(chr) ? ' ' : chr; } InputTextReader(String content); char read(); String peek(int numberChars); char peekChar(int offset); boolean canReadChars(int numberChars); boolean eof(); int getPosition(); int getBacktrackedCount(); void seek(int position); void goBack();  }
@Test public void testSimpleRead() { InputTextReader reader = new InputTextReader(CONTENT); for (int i = 0; i < CONTENT.length(); i++) { Assert.assertEquals(reader.read(), CONTENT.charAt(i)); } }