}
public void testResumeTraversal() throws RepositoryException {
MockRepositoryEventList mrel =
new MockRepositoryEventList("MockRepositoryEventLog1.txt");
MockRepository r = new MockRepository(mrel);
QueryManager qm = new MockJcrQueryManager(r.getStore());
TraversalManager qtm = new JcrTraversalManager(qm);
{
MockRepositoryDocument mockDoc = r.getStore().getDocByID("doc2");
Document doc = new JcrDocument(new MockJcrNode(mockDoc));
String checkpointString = JcrDocumentList.checkpoint(doc);
DocumentList documentList = qtm.resumeTraversal(checkpointString);
int counter = countDocuments(documentList);
Assert.assertEquals(2, counter);
}
{
MockRepositoryDocument mockDoc = r.getStore().getDocByID("doc4");
Document doc = new JcrDocument(new MockJcrNode(mockDoc));
String checkpointString = JcrDocumentList.checkpoint(doc);
DocumentList documentList = qtm.resumeTraversal(checkpointString);
int counter = countDocuments(documentList);
Assert.assertEquals(0, counter);