BasicNode nodeB = graph.connect(nodeA,new BasicNode("b"),5);
BasicNode nodeC = graph.connect(nodeA,new BasicNode("c"),2);
BasicNode nodeD = graph.connect(nodeB, new BasicNode("d"), 1);
nodeC.connect(nodeD, 1);
BreadthFirstSearch search = new BreadthFirstSearch(graph,nodeA,new SimpleDestinationGoal(nodeD));
Assert.assertEquals(4, countIterations(search));
BasicPath solution = search.getSolution();
Assert.assertEquals(solution.getNodes().get(0).getLabel(), "a");
Assert.assertEquals(solution.getNodes().get(1).getLabel(), "b");
Assert.assertEquals(solution.getNodes().get(2).getLabel(), "d");
}