### Question:
DijkstraOneToMany extends AbstractRoutingAlgorithm { @Override public Path calcPath(int from, int to) { fromNode = from; endNode = findEndNode(from, to); return extractPath(); } DijkstraOneToMany(Graph graph, Weighting weighting, TraversalMode tMode); @Override Path calcPath(int from, int to); @Override Path extractPath(); DijkstraOneToMany clear(); double getWeight(int endNode); int findEndNode(int from, int to); @Override boolean finished(); void setWeightLimit(double weightLimit); void close(); @Override int getVisitedNodes(); @Override String getName(); String getMemoryUsageAsString();  }### Answer:
@Test public void testIssue182() { GraphHopperStorage storage = createGHStorage(false); initGraph(storage); RoutingAlgorithm algo = createAlgo(storage); Path p = algo.calcPath(0, 8); assertEquals(Helper.createTList(0, 7, 8), p.calcNodes()); p = algo.calcPath(0, 10); assertEquals(Helper.createTList(0, 1, 2, 3, 4, 10), p.calcNodes()); }
@Test public void testUseCache() { RoutingAlgorithm algo = createAlgo(createTestStorage()); Path p = algo.calcPath(0, 4); assertEquals(Helper.createTList(0, 4), p.calcNodes()); p = algo.calcPath(0, 7); assertEquals(Helper.createTList(0, 4, 5, 7), p.calcNodes()); p = algo.calcPath(0, 2); assertEquals(Helper.createTList(0, 1, 2), p.calcNodes()); }
@Test public void testUseCacheZeroPath_issue707() { RoutingAlgorithm algo = createAlgo(createTestStorage()); Path p = algo.calcPath(0, 0); assertEquals(0, p.distance, 0.00000); p = algo.calcPath(0, 4); assertEquals(Helper.createTList(0, 4), p.calcNodes()); p = algo.calcPath(0, 7); assertEquals(Helper.createTList(0, 4, 5, 7), p.calcNodes()); p = algo.calcPath(0, 2); assertEquals(Helper.createTList(0, 1, 2), p.calcNodes()); }
@Test public void testIssue182() { GraphHopperStorage graph = createGHStorage(); initGraph(graph); Path p = calcPath(graph, 0, 8); assertEquals(IntArrayList.from(0, 7, 8), p.calcNodes()); p = calcPath(graph, 0, 10); assertEquals(IntArrayList.from(0, 1, 2, 3, 4, 10), p.calcNodes()); }
@Test public void testUseCache() { GraphHopperStorage graph = createGHStorage(); initTestStorage(graph); RoutingAlgorithm algo = createAlgo(graph); Path p = algo.calcPath(0, 4); assertEquals(IntArrayList.from(0, 4), p.calcNodes()); p = algo.calcPath(0, 7); assertEquals(IntArrayList.from(0, 4, 5, 7), p.calcNodes()); p = algo.calcPath(0, 2); assertEquals(IntArrayList.from(0, 1, 2), p.calcNodes()); }
@Test public void testUseCacheZeroPath_issue707() { GraphHopperStorage graph = createGHStorage(); initTestStorage(graph); RoutingAlgorithm algo = createAlgo(graph); Path p = algo.calcPath(0, 0); assertEquals(0, p.getDistance(), 0.00000); p = algo.calcPath(0, 4); assertEquals(IntArrayList.from(0, 4), p.calcNodes()); p = algo.calcPath(0, 7); assertEquals(IntArrayList.from(0, 4, 5, 7), p.calcNodes()); p = algo.calcPath(0, 2); assertEquals(IntArrayList.from(0, 1, 2), p.calcNodes()); }