private void checkNext(BoundsPostingList postingList, int movePast, int docId, int intervalCount) {
        assertTrue(postingList.nextDocument(movePast), "Unable to move past " + movePast);
        assertEquals(intervalCount > 0, postingList.prepareIntervals());
        assertEquals(docId, postingList.getDocId());
        for (int i = 0; i < intervalCount - 1; ++i) {
            assertTrue(postingList.nextInterval(), "Too few intervals, expected " + intervalCount);
        }
        assertFalse(postingList.nextInterval(), "Too many intervals, expected " + intervalCount);
    }
This test lies in com.yahoo.search.predicate to get access to some methods of PredicateIndex.

@author <a href="mailto:magnarn@yahoo-inc.com">Magnar Nedland</a>
predicate-search/src/test/java/com/yahoo/search/predicate/index/BoundsPostingListTest.java