}
public void testNext() throws IOException {
TermAttribute termAtt = (TermAttribute)merger.getAttribute(TermAttribute.class);
OffsetAttribute offsetAtt = (OffsetAttribute)merger.getAttribute(OffsetAttribute.class);
PositionIncrementAttribute posIncAtt = (PositionIncrementAttribute)merger.getAttribute(PositionIncrementAttribute.class);
merger.incrementToken();
assertEquals("1111", termAtt.term());
assertEquals(0, offsetAtt.startOffset());
assertEquals(4, offsetAtt.endOffset());
assertEquals(1, posIncAtt.getPositionIncrement());
merger.incrementToken();
assertEquals("1111", termAtt.term());
assertEquals(5, offsetAtt.startOffset());
assertEquals(9, offsetAtt.endOffset());
assertEquals(1, posIncAtt.getPositionIncrement());
merger.incrementToken();
assertEquals("2222", termAtt.term());
assertEquals(5, offsetAtt.startOffset());
assertEquals(9, offsetAtt.endOffset());
assertEquals(0, posIncAtt.getPositionIncrement());
merger.incrementToken();
assertEquals("1111", termAtt.term());
assertEquals(10, offsetAtt.startOffset());
assertEquals(14, offsetAtt.endOffset());
assertEquals(1, posIncAtt.getPositionIncrement());
merger.incrementToken();
assertEquals("3333", termAtt.term());
assertEquals(10, offsetAtt.startOffset());
assertEquals(14, offsetAtt.endOffset());
assertEquals(0, posIncAtt.getPositionIncrement());
merger.incrementToken();
assertEquals("1111", termAtt.term());
assertEquals(15, offsetAtt.startOffset());
assertEquals(19, offsetAtt.endOffset());
assertEquals(1, posIncAtt.getPositionIncrement());
merger.incrementToken();
assertEquals("2222", termAtt.term());
assertEquals(15, offsetAtt.startOffset());
assertEquals(19, offsetAtt.endOffset());
assertEquals(0, posIncAtt.getPositionIncrement());
}