### Question:
BidirPathExtractor { protected Path extract(SPTEntry fwdEntry, SPTEntry bwdEntry, double weight) { if (fwdEntry == null || bwdEntry == null) { return path; } if (fwdEntry.adjNode != bwdEntry.adjNode) throw new IllegalStateException("forward and backward entries must have same adjacent nodes, fwdEntry:" + fwdEntry + ", bwdEntry:" + bwdEntry); StopWatch sw = new StopWatch().start(); extractFwdPath(fwdEntry); processMeetingPoint(fwdEntry, bwdEntry); extractBwdPath(bwdEntry); setExtractionTime(sw.stop().getNanos()); path.setFound(true); path.setWeight(weight); return path; } protected  BidirPathExtractor(Graph graph, Weighting weighting); static Path extractPath(Graph graph, Weighting weighting, SPTEntry fwdEntry, SPTEntry bwdEntry, double weight);  }### Answer:
@Test public void testExtract() { Graph g = createGraph(); g.edge(1, 2, 10, true); SPTEntry fwdEntry = new SPTEntry(0, 2, 0); fwdEntry.parent = new SPTEntry(EdgeIterator.NO_EDGE, 1, 10); SPTEntry bwdEntry = new SPTEntry(EdgeIterator.NO_EDGE, 2, 0); Path p = BidirPathExtractor.extractPath(g, new FastestWeighting(carEncoder), fwdEntry, bwdEntry, 0); assertEquals(IntArrayList.from(1, 2), p.calcNodes()); assertEquals(10, p.getDistance(), 1e-4); }