public static ConnectedComponents findComponentsRecursive(Graph graph, EdgeTransitionFilter edgeTransitionFilter, boolean excludeSingleEdgeComponents) {
        return new EdgeBasedTarjanSCC(graph, edgeTransitionFilter, excludeSingleEdgeComponents).findComponentsRecursive();
    }
@Test
    public void linearBidirectionalEdge() {
        // 0 -> 1 - 2 <- 3
        g.edge(0, 1).setDistance(1).set(speedEnc, 10, 0);
        g.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);
        g.edge(3, 2).setDistance(1).set(speedEnc, 10, 0);
        ConnectedComponents result = EdgeBasedTarjanSCC.findComponentsRecursive(g, fwdAccessFilter, false);
        assertEquals(6, result.getEdgeKeys());
        assertEquals(5, result.getTotalComponents());
        // a single bidirectional edge is treated as a 'real' component with two edge-keys. this is not nearly as
        // common as the single-edge-key components so no real need to do a special treatment for these as well.
        assertEquals(1, result.getComponents().size());
        assertEquals(4, result.getSingleEdgeComponents().cardinality());
        assertEquals(result.getComponents().get(0), result.getBiggestComponent());
    }