public static ConnectedComponents findComponentsRecursive(Graph graph, EdgeTransitionFilter edgeTransitionFilter, boolean excludeSingleEdgeComponents) {
        return new EdgeBasedTarjanSCC(graph, edgeTransitionFilter, excludeSingleEdgeComponents).findComponentsRecursive();
    }
@Test
    public void tree() {
        // 0 - 1 - 2 - 4 - 5
        //     |    \- 6 - 7
        //     3        \- 8
        g.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);
        g.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);
        g.edge(1, 3).setDistance(1).set(speedEnc, 10, 10);
        g.edge(2, 4).setDistance(1).set(speedEnc, 10, 10);
        g.edge(2, 6).setDistance(1).set(speedEnc, 10, 10);
        g.edge(4, 5).setDistance(1).set(speedEnc, 10, 10);
        g.edge(6, 7).setDistance(1).set(speedEnc, 10, 10);
        g.edge(6, 8).setDistance(1).set(speedEnc, 10, 10);
        ConnectedComponents result = EdgeBasedTarjanSCC.findComponentsRecursive(g, fwdAccessFilter, false);
        assertEquals(16, result.getEdgeKeys());
        assertEquals(1, result.getTotalComponents());
        assertEquals(1, result.getComponents().size());
        assertTrue(result.getSingleEdgeComponents().isEmpty());
        assertEquals(result.getComponents().get(0), result.getBiggestComponent());
        assertEquals(IntArrayList.from(1, 3, 7, 11, 10, 6, 9, 13, 12, 15, 14, 8, 2, 5, 4, 0), result.getComponents().get(0));
    }