@Test
public void testCalcFastestPath() {
GraphHopperStorage graphShortest = createGHStorage(false);
initDirectedAndDiffSpeed(graphShortest, carEncoder);
Path p1 = createAlgo(graphShortest, defaultOpts).
calcPath(0, 3);
assertEquals(IntArrayList.from(new int[]{0, 1, 5, 2, 3}), p1.calcNodes());
assertEquals(p1.toString(), 402.3, p1.getDistance(), .1);
assertEquals(p1.toString(), 144823, p1.getTime());
AlgorithmOptions opts = AlgorithmOptions.start().
weighting(new FastestWeighting(carEncoder)).build();
GraphHopperStorage graphFastest = createGHStorage(encodingManager, Arrays.asList(opts.getWeighting()), false);
initDirectedAndDiffSpeed(graphFastest, carEncoder);
Path p2 = createAlgo(graphFastest, opts).
calcPath(0, 3);
assertEquals(IntArrayList.from(new int[]{0, 4, 6, 7, 5, 3}), p2.calcNodes());
assertEquals(p2.toString(), 1261.7, p2.getDistance(), 0.1);
assertEquals(p2.toString(), 111442, p2.getTime());
}