### Question:
SpansNGrams extends BLSpans { public SpansNGrams(LeafReader reader, String fieldName, int min, int max) { maxDoc = reader == null ? -1 : reader.maxDoc(); liveDocs = reader == null ? null : MultiFields.getLiveDocs(reader); subtractClosingToken = 1; this.lengthGetter = new DocFieldLengthGetter(reader, fieldName); this.min = min; this.max = max; } SpansNGrams(LeafReader reader, String fieldName, int min, int max); @Override int docID(); @Override int endPosition(); @Override int nextDoc(); @Override int nextStartPosition(); @Override int advanceStartPosition(int target); @Override int advance(int doc); @Override int startPosition(); @Override String toString(); @Override void getCapturedGroups(Span[] capturedGroups); @Override int width(); @Override void collect(SpanCollector collector); @Override float positionsCost();  }### Answer:
@Test public void testSpansNGrams() throws IOException { Spans exp = MockSpans.fromLists( new int[] { 0, 0, 0, 0, 0, 0, 0 }, new int[] { 0, 0, 1, 1, 2, 2, 3 }, new int[] { 2, 3, 3, 4, 4, 5, 5 }); TestUtil.assertEquals(exp, getSpans()); }