document2.setParentList(list2);
List<SPDocument> list2CrawlQueue = new ArrayList<SPDocument>();
list2CrawlQueue.add(document2);
list2.setCrawlQueue(list2CrawlQueue);
SPDocumentList traversalResult =
spClient.traverse(globalState, dummyWebState, 0, true);
assertNotNull(traversalResult);
assertEquals(ImmutableList.of(
document0, document1, document2), traversalResult.getDocuments());
assertEquals(ImmutableList.of(document0, document1), list1.getCrawlQueue());
assertEquals(ImmutableList.of(document2), list2.getCrawlQueue());
}