### Question:
PrepareContractionHierarchies extends AbstractAlgoPreparation { public Weighting getWeighting() { return chProfile.getWeighting(); } 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 testReturnsCorrectWeighting() { PrepareContractionHierarchies prepare = createPrepareContractionHierarchies(g); prepare.doWork(); assertSame(weighting, prepare.getWeighting()); }