@Override
    public Path extract(SPTEntry fwdEntry, SPTEntry bwdEntry, double weight) {
        if (fwdEntry == null || bwdEntry == null) {
            // path not found
            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;
    }
@Test
    public void testExtract() {
        Graph graph = createGraph();
        graph.edge(1, 2).setDistance(10).set(speedEnc, 60, 60);
        SPTEntry fwdEntry = new SPTEntry(0, 2, 0, new SPTEntry(1, 10));
        SPTEntry bwdEntry = new SPTEntry(2, 0);
        Path p = DefaultBidirPathExtractor.extractPath(graph, new SpeedWeighting(speedEnc), fwdEntry, bwdEntry, 0);
        assertEquals(IntArrayList.from(1, 2), p.calcNodes());
        assertEquals(10, p.getDistance(), 1e-4);
    }