// doc no. i
Set<Integer> values = new HashSet<Integer>();
for (int j = 0; j < data[i].length; j++) {
values.add(data[i][j]);
}
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));