### Question:
DefaultJavadocScanner implements JavadocScanner { @Override public void consume(int count) { if (count < 0) { throw new IllegalArgumentException(); } setIndex(index + count); } DefaultJavadocScanner(List<JavadocToken> tokens, int successorStartsAt); static DefaultJavadocScanner newInstance(String text); @Override List<JavadocToken> getTokens(); @Override int getIndex(); @Override void seek(int position); @Override void consume(int count); @Override JavadocToken nextToken(); @Override JavadocToken lookahead(int offset); @Override String toString();  }### Answer:
@Test public void testConsume() { String text = load("empty.doc.txt"); DefaultJavadocScanner scanner = DefaultJavadocScanner.newInstance(text); assertEquals(SLASH, scanner.nextToken().getKind()); scanner.consume(3); assertEquals(SLASH, scanner.nextToken().getKind()); assertEquals(EOF, scanner.nextToken().getKind()); }