SpansTags extends BLSpans { @Override public int advance(int target) throws IOException { end = -1; return tags.advance(target); } SpansTags(BLSpans startTags); @Override void getCapturedGroups(Span[] capturedGroups); @Override int nextDoc(); @Override int advance(int target); @Override int docID(); @Override int nextStartPosition(); @Override int startPosition(); @Override int endPosition(); @Override int width(); @Override void collect(SpanCollector collector); @Override float positionsCost();  }
@Test public void testSkip() throws IOException { int[] aDoc = { 1, 1, 2, 2 }; int[] aStart = { 2, 4, 12, 14 }; int[] aEnd = { 5, 7, 17, 15 }; BLSpans a = MockSpans.withEndInPayload(aDoc, aStart, aEnd); Spans spans = new SpansTags(a); spans.advance(2); int[] expDoc = { 2, 2 }; int[] expStart = { 12, 14 }; int[] expEnd = { 17, 15 }; Spans exp = new MockSpans(expDoc, expStart, expEnd); TestUtil.assertEquals(exp, spans, true); }