public static ConnectedComponents findComponentsRecursive(Graph graph, EdgeTransitionFilter edgeTransitionFilter, boolean excludeSingleEdgeComponents) {
        return new EdgeBasedTarjanSCC(graph, edgeTransitionFilter, excludeSingleEdgeComponents).findComponentsRecursive();
    }
@Test
    public void smallGraph() {
        // 3<-0->2-1
        g.edge(0, 2).setDistance(1).set(speedEnc, 10, 0); // edge-keys 0,1
        g.edge(0, 3).setDistance(1).set(speedEnc, 10, 0); // edge-keys 2,3
        g.edge(2, 1).setDistance(1).set(speedEnc, 10, 10); // edge-keys 4,5
        ConnectedComponents result = EdgeBasedTarjanSCC.findComponentsRecursive(g, fwdAccessFilter, false);
        assertEquals(6, result.getEdgeKeys());
        assertEquals(5, result.getTotalComponents());
        assertEquals(1, result.getComponents().size());
        assertEquals(result.getComponents().get(0), result.getBiggestComponent());
        assertEquals(IntArrayList.from(5, 4), result.getComponents().get(0));
        assertEquals(4, result.getSingleEdgeComponents().cardinality());
        for (IntCursor c : IntArrayList.from(0, 1, 2, 3))
            assertTrue(result.getSingleEdgeComponents().get(c.value));
    }