### Question:
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public JavadocToken peek() { int index = scanner.getIndex(); try { return nextToken(); } finally { scanner.seek(index); } } DefaultJavadocTokenStream(JavadocScanner scanner); @Override JavadocToken peek(); @Override JavadocToken lookahead(int k); @Override JavadocToken nextToken(); @Override void mark(); @Override void rewind(); @Override void discard();  }### Answer:
@Test public void testPeek() { DefaultJavadocTokenStream stream = stream("alphabets.txt"); assertEquals("a", stream.peek().getText()); assertEquals("a", stream.peek().getText()); assertEquals("a", stream.peek().getText()); stream.nextToken(); assertEquals("b", stream.peek().getText()); assertEquals("b", stream.peek().getText()); assertEquals("b", stream.peek().getText()); }