BasicNode nodeC = graph.connect(nodeA, new EuclideanNode("c",0,1), 1.0);
BasicNode nodeD = graph.connect(nodeB, new EuclideanNode("d",0,1), 1.0);
nodeD.connect(nodeD, 1.0);
nodeC.connect(nodeD, 1.0);
AStarSearch search = new AStarSearch(
graph,
nodeA,
new SimpleDestinationGoal(nodeD),
new EuclideanCostEstimator());
Assert.assertEquals(3, countIterations(search));
BasicPath solution = search.getSolution();
Assert.assertEquals(solution.getNodes().get(0).getLabel(), "a");
Assert.assertEquals(solution.getNodes().get(1).getLabel(), "c");
Assert.assertEquals(solution.getNodes().get(2).getLabel(), "d");
}