### Question:
PrepareContractionHierarchies extends AbstractAlgoPreparation { public RoutingAlgorithmFactory getRoutingAlgorithmFactory() { return new CHRoutingAlgorithmFactory(chGraph); } private  PrepareContractionHierarchies(GraphHopperStorage ghStorage, CHProfile chProfile); static PrepareContractionHierarchies fromGraphHopperStorage(GraphHopperStorage ghStorage, CHProfile chProfile); PrepareContractionHierarchies setParams(PMap pMap); PrepareContractionHierarchies useFixedNodeOrdering(NodeOrderingProvider nodeOrderingProvider); @Override void doSpecificWork(); boolean isEdgeBased(); long getDijkstraCount(); long getShortcuts(); double getLazyTime(); double getPeriodTime(); double getNeighborTime(); Weighting getWeighting(); CHProfile getCHProfile(); long getTotalPrepareTime(); @Override String toString(); RoutingAlgorithmFactory getRoutingAlgorithmFactory();  }### Answer:
@Test public void testRoundaboutUnpacking() { initRoundaboutGraph(g); int oldCount = g.getEdges(); PrepareContractionHierarchies prepare = createPrepareContractionHierarchies(g); prepare.doWork(); assertEquals(oldCount, g.getEdges()); assertEquals(oldCount, lg.getOriginalEdges()); assertEquals(oldCount + 23, lg.getEdges()); RoutingAlgorithm algo = prepare.getRoutingAlgorithmFactory().createAlgo(lg, new AlgorithmOptions(DIJKSTRA_BI, weighting, tMode)); Path p = algo.calcPath(4, 7); assertEquals(IntArrayList.from(4, 5, 6, 7), p.calcNodes()); }
@Test public void testUnpackingOrder() { initUnpackingGraph(g, lg, weighting); PrepareContractionHierarchies prepare = createPrepareContractionHierarchies(g); RoutingAlgorithm algo = prepare.getRoutingAlgorithmFactory().createAlgo(lg, new AlgorithmOptions(DIJKSTRA_BI, weighting, tMode)); Path p = algo.calcPath(10, 6); assertEquals(7, p.getDistance(), 1e-5); assertEquals(IntArrayList.from(10, 0, 1, 2, 3, 4, 5, 6), p.calcNodes()); }
@Test public void testUnpackingOrder_Fastest() { Weighting w = new FastestWeighting(carEncoder); initUnpackingGraph(g, lg, w); PrepareContractionHierarchies prepare = createPrepareContractionHierarchies(g); RoutingAlgorithm algo = prepare.getRoutingAlgorithmFactory().createAlgo(lg, new AlgorithmOptions(DIJKSTRA_BI, weighting, tMode)); Path p = algo.calcPath(10, 6); assertEquals(7, p.getDistance(), 1e-1); assertEquals(IntArrayList.from(10, 0, 1, 2, 3, 4, 5, 6), p.calcNodes()); }