// TODO: Investigate: this loop looks weird cause it goes for BATCH_COUNT-1.
for (int batch = 1; batch < BATCH_COUNT; batch++) {
docs = tm.resumeTraversal(docs.checkpoint());
assertEquals(1 + batch, monitorManager.getGuaranteeCount());
for (int k = 0; k < BATCH_SIZE; ++k) {
Document doc = docs.nextDocument();
assertNotNull(doc);
String docId = Value.getSingleValueString(doc, SpiConstants.PROPNAME_DOCID);
assertEquals(String.format("/foo/bar/file.%d", batch * BATCH_SIZE + k),
docId);
}