### Question:
RangeDijkstra extends AbstractIsochroneDijkstra { private void getMaxWeight() { for (IntObjectCursor<SPTEntry> entry : fromMap) { if (USERELEVANTONLY && !relevantNodes.contains(entry.key)) continue; if (maximumWeight < entry.value.weight) maximumWeight = entry.value.weight; } } RangeDijkstra(Graph graph, Weighting weighting); double calcMaxWeight(int from, IntHashSet relevantNodes); void setCellNodes(IntHashSet cellNodes); int getFoundCellNodeSize(); @Override String getName();  }### Answer:
@Test public void testGetMaxWeight() { GraphHopperStorage graphHopperStorage = createSimpleGraph(); RangeDijkstra rangeDijkstra = new RangeDijkstra(graphHopperStorage.getBaseGraph(), new ShortestWeighting(carEncoder)); rangeDijkstra.setMaxVisitedNodes(getMaxCellNodesNumber() * 10); IntHashSet cellNodes = new IntHashSet(); IntHashSet relevantNodes = new IntHashSet(); cellNodes.addAll(0, 1, 2, 5); relevantNodes.addAll(0, 1, 2); rangeDijkstra.setCellNodes(cellNodes); assertEquals(3.0, rangeDijkstra.calcMaxWeight(0, cellNodes), 1e-10); rangeDijkstra = new RangeDijkstra(graphHopperStorage.getBaseGraph(), new ShortestWeighting(carEncoder)); rangeDijkstra.setMaxVisitedNodes(getMaxCellNodesNumber() * 10); rangeDijkstra.setCellNodes(cellNodes); assertEquals(1.0, rangeDijkstra.calcMaxWeight(0, relevantNodes), 1e-10); }