int k = 4;
Object[] obj = GraphTestUtil.buildPerfectBinaryTree(builder(), k);
Node root = (Node)obj[0];
Map id2node = (Map)obj[1];
DijkstraShortestPathFinder pfinder = new DijkstraShortestPathFinder(
builder().getGraph(), root, costFunction()
);
pfinder.calculate();
for (Iterator itr = builder().getGraph().getNodes().iterator(); itr.hasNext();) {
Node node = (Node)itr.next();
String id = node.getObject().toString();
if (id2node.get(id + ".0") == null) {
Path p = pfinder.getPath(node);
assertTrue(p.size() == k+1);
for (Iterator pitr = p.iterator(); pitr.hasNext();) {
Node n = (Node)pitr.next();
assertTrue(n.getObject().toString().equals(id));