}
boolean hasDoc = cli.skipTo(i);
if (hasDoc) {
assertTrue("Document "+i+" must not have a payload!", i==0 || i==2 );
long cat;
while ((cat = cli.nextCategory()) < Integer.MAX_VALUE) {
assertTrue("expected category not found: " + cat, values.contains((int) cat));
++totalCats;
}
} else {
assertFalse("Document "+i+" must have a payload!", i==0 || i==2 );