public static List<List<GtfsStorage.FeedIdWithStopId>> findStronglyConnectedComponentsOfStopGraph(PtGraph ptGraph) {
        PtGraphAsAdjacencyList ptGraphAsAdjacencyList = new PtGraphAsAdjacencyList(ptGraph);
        TarjanSCC.ConnectedComponents components = TarjanSCC.findComponents(ptGraphAsAdjacencyList, EdgeFilter.ALL_EDGES, false);
        List<List<GtfsStorage.FeedIdWithStopId>> stronglyConnectedComponentsOfStopGraph = new ArrayList<>();
        for (IntArrayList component : components.getComponents()) {
            ArrayList<GtfsStorage.FeedIdWithStopId> stopsOfComponent = new ArrayList<>();
            for (IntCursor intCursor : component) {
                stopsOfComponent.addAll(getStopsForNode(ptGraph, intCursor.value));
            }
            if (!stopsOfComponent.isEmpty()) {
                stronglyConnectedComponentsOfStopGraph.add(stopsOfComponent);
            }
        }
        BitSetIterator iter = components.getSingleNodeComponents().iterator();
        for (int i = iter.nextSetBit(); i >= 0; i = iter.nextSetBit()) {
            List<GtfsStorage.FeedIdWithStopId> stopsForNode = getStopsForNode(ptGraph, i);
            if (!stopsForNode.isEmpty()) {
                stronglyConnectedComponentsOfStopGraph.add(stopsForNode);
            }
        }
        return stronglyConnectedComponentsOfStopGraph;
    }
@Test
    public void testStronglyConnectedComponentsOfStopGraph() {
        PtGraph ptGraph = graphHopperGtfs.getPtGraph();
        List<List<GtfsStorage.FeedIdWithStopId>> stronglyConnectedComponentsOfStopGraph = Analysis.findStronglyConnectedComponentsOfStopGraph(ptGraph);
        List<GtfsStorage.FeedIdWithStopId> largestComponent = stronglyConnectedComponentsOfStopGraph.get(0);

        assertThat(largestComponent)
                .extracting("stopId")
                .containsExactlyInAnyOrder("EMSI", "DADAN", "NADAV", "NANAA", "STAGECOACH", "AMV", "FUR_CREEK_RES", "BULLFROG", "BEATTY_AIRPORT", "AIRPORT");

        List<List<GtfsStorage.FeedIdWithStopId>> singleElementComponents = stronglyConnectedComponentsOfStopGraph.subList(1, 4);
        assertThat(singleElementComponents.stream().map(it -> it.get(0)))
                .extracting("stopId")
                .containsExactlyInAnyOrder("JUSTICE_COURT", "MUSEUM", "NEXT_TO_MUSEUM");
    }