public static ConnectedComponents findComponentsRecursive(Graph graph, EdgeFilter edgeFilter, boolean excludeSingleNodeComponents) {
        return new TarjanSCC(graph, edgeFilter, excludeSingleNodeComponents).findComponentsRecursive();
    }
@Test
    public void testTarjan_issue761() {
        //     11-10-9
        //     |     |
        // 0-1-2->3->4->5
        //        |     |
        //        6     12
        //        |     |
        //        7     13-14
        //        |       \|
        //        8        15-16

        // oneway main road
        graph.edge(0, 1).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(1, 2).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(2, 3).setDistance(1).set(speedEnc, 10, 0);
        graph.edge(3, 4).setDistance(1).set(speedEnc, 10, 0);
        graph.edge(4, 5).setDistance(1).set(speedEnc, 10, 0);

        // going south from main road
        graph.edge(3, 6).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(6, 7).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(7, 8).setDistance(1).set(speedEnc, 10, 10);

        // connects the two nodes 2 and 4
        graph.edge(4, 9).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(9, 10).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(10, 11).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(11, 2).setDistance(1).set(speedEnc, 10, 10);

        // eastern part (only connected by a single directed edge to the rest of the graph)
        graph.edge(5, 12).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(12, 13).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(13, 14).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(14, 15).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(15, 13).setDistance(1).set(speedEnc, 10, 10);
        graph.edge(15, 16).setDistance(1).set(speedEnc, 10, 10);

        TarjanSCC.ConnectedComponents scc = TarjanSCC.findComponentsRecursive(graph, edgeFilter, false);
        assertEquals(2, scc.getTotalComponents());
        assertTrue(scc.getSingleNodeComponents().isEmpty());
        assertEquals(17, scc.getNodes());
        assertEquals(scc.getComponents().get(1), scc.getBiggestComponent());

        assertEquals(2, scc.getComponents().size());
        assertEquals(IntArrayList.from(14, 16, 15, 13, 12, 5), scc.getComponents().get(0));
        assertEquals(IntArrayList.from(8, 7, 6, 3, 4, 9, 10, 11, 2, 1, 0), scc.getComponents().get(1));
    }