public static BfsResult breadthFirst(Collection<Vertex> roots) {
        return breadthFirst(roots, false, null);
    }
@Test
    public void testBFSBasic() throws InvalidIRException {
        Graph g = Graph.empty();
        g.chainVertices(IRHelpers.createTestVertex(), IRHelpers.createTestVertex(), IRHelpers.createTestVertex());

        // We don't *really* need threadsafety for the count,
        // but since we're using a lambda we need something that's final
        final AtomicInteger visitCount = new AtomicInteger();
        BreadthFirst.BfsResult res = BreadthFirst.breadthFirst(g.getRoots(), false, (v -> visitCount.incrementAndGet()));

        assertEquals("It should visit each node once", visitCount.get(), 3);
        assertThat(res.getVertices(), is(g.getVertices()));
    }