public static ConnectedComponents findComponentsRecursive(Graph graph, EdgeTransitionFilter edgeTransitionFilter, boolean excludeSingleEdgeComponents) {
        return new EdgeBasedTarjanSCC(graph, edgeTransitionFilter, excludeSingleEdgeComponents).findComponentsRecursive();
    }
@Test
    public void linearOneWay() {
        // 0 -> 1 -> 2
        g.edge(0, 1).setDistance(1).set(speedEnc, 10, 0);
        g.edge(1, 2).setDistance(1).set(speedEnc, 10, 0);
        ConnectedComponents result = EdgeBasedTarjanSCC.findComponentsRecursive(g, fwdAccessFilter, false);
        assertEquals(4, result.getEdgeKeys());
        assertEquals(4, result.getTotalComponents());
        assertEquals(0, result.getComponents().size());
        // we only have two directed edges here, but we always calculate the component indices for all edge keys and
        // here every (directed) edge belongs to its own component
        assertEquals(4, result.getSingleEdgeComponents().cardinality());
        assertEquals(IntArrayList.from(), result.getBiggestComponent());
    }