};
NoBifurcationIterator iterator = createIterator();
iterator.setSource(ends[0]);
BasicGraphTraversal traversal = new BasicGraphTraversal(
builder().getGraph(), walker, iterator
);
traversal.init();
traversal.traverse();
//stopping node should be visited and nodes with greater id should not
GraphVisitor visitor = new GraphVisitor() {
public int visit(Graphable component) {
if (component.getID() <= suspend) assertTrue(component.isVisited());
else assertTrue(!component.isVisited());
return(0);
}
};
builder().getGraph().visitNodes(visitor);
assertTrue(walker.getCount() == nnodes-suspend+1);
traversal.traverse();
//every node should now be visited
visitor = new GraphVisitor() {
public int visit(Graphable component) {
assertTrue(component.isVisited());