assertEquals(expectedItems, visitor1.visitedItems);
assertEquals(expectedItems, visitor2.visitedItems);
}
public void testPauseAndResumeSynchronouslyCalled() {
FinishedCallback finishedCallback =
EasyMock.createStrictMock(ResumableTreeTraverser.FinishedCallback.class);
finishedCallback.onTraversalFinished();
EasyMock.replay(finishedCallback);
ResumableTreeTraverser<TreeNodeInfo> traverser = new ResumableTreeTraverser<TreeNodeInfo>(
provider, provider.getChildrenIterator(root),
JsonCollections.createArray(new AlwaysPauseAndResumeVisitor()), finishedCallback);