RoutingRequest options = new RoutingRequest();
options.dateTime = TestUtils.dateInSeconds("America/New_York", 2009, 8, 7, 0, 0, 0);
ShortestPathTree spt;
GraphPath path;
// A to B
options.setRoutingContext(graph, stop_a, stop_b);
spt = aStar.getShortestPathTree(options);
path = spt.getPath(stop_b, false);
assertNotNull(path);
assertEquals(extractStopVertices(path), Lists.newArrayList(stop_a, stop_b));
// A to C
options.setRoutingContext(graph, stop_a, stop_c);
spt = aStar.getShortestPathTree(options);
path = spt.getPath(stop_c, false);
assertNotNull(path);
assertEquals(extractStopVertices(path), Lists.newArrayList(stop_a, stop_c));
// A to D
options.setRoutingContext(graph, stop_a, stop_d);
spt = aStar.getShortestPathTree(options);
path = spt.getPath(stop_d, false);
assertNotNull(path);
assertEquals(extractStopVertices(path), Lists.newArrayList(stop_a, stop_c, stop_d));
long endTime = TestUtils.dateInSeconds("America/New_York", 2009, 8, 7, 0, 0, 0) + 40 * 60;
assertEquals(endTime, path.getEndTime());
// A to E
options.setRoutingContext(graph, stop_a, stop_e);
spt = aStar.getShortestPathTree(options);
path = spt.getPath(stop_e, false);
assertNotNull(path);
assertEquals(extractStopVertices(path), Lists.newArrayList(stop_a, stop_c, stop_e));
endTime = TestUtils.dateInSeconds("America/New_York", 2009, 8, 7, 0, 0, 0) + 70 * 60;
assertEquals(endTime, path.getEndTime());
}