### Question:
DijkstraOneToMany extends AbstractRoutingAlgorithm { @Override public Path calcPath( int from, int to ) { fromNode = from; endNode = findEndNode(from, to); return extractPath(); } DijkstraOneToMany( Graph graph, FlagEncoder encoder, Weighting weighting, TraversalMode tMode ); DijkstraOneToMany setLimitVisitedNodes( int nodes ); @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 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()); }