ValueSourceScorer scorer = values.getRangeScorer(leaf.reader(), "4", "40", true, true);
assertEquals(-1, scorer.docID());
assertEquals(0, scorer.nextDoc());
assertEquals(1, scorer.nextDoc());
assertEquals(2, scorer.nextDoc());
assertEquals(DocIdSetIterator.NO_MORE_DOCS, scorer.nextDoc());
// just the first doc
scorer = values.getRangeScorer(leaf.reader(), "4", "40", false, false);
assertEquals(-1, scorer.docID());
assertEquals(0, scorer.nextDoc());