@Test
public void identifyRootProjectWithEdges() throws IOException {

    InputStream inputStream = new NamedGraphBuilder()
            .project(p -> p.name("project"))
            .project(p -> p.name("subproject"))
            .relateToFirst(Project.class, Project::subproject)
            .project(p -> p.name("subsubproject"))
            .relateToLast(Project.class, Project::subproject)
            .project(p -> p.name("oldproject"))
            .relateToFirst(Project.class, Project::previousVersion)
            .build();
    BlackDuckIo bdio = graph.io(testBdio(TT.Metadata, TT.root));
    bdio.readGraph(inputStream, null, null);
    spi(bdio, graph.traversal().withStrategies(testImplicitConstant())).identifyRoot();
    GraphTraversalSource g = graph.traversal();
    List<Vertex> roots = g.V().hasLabel(TT.Metadata).out(TT.root).toList();
    assertThat(roots).hasSize(1);
    assertThat(roots.get(0).<String> value(Bdio.DataProperty.name.name())).isEqualTo("project");
}