public void validateDocumentGraph(List<SDDocumentType> documents) {
        for (SDDocumentType document : documents) {
            validateRoot(document);
        }
    }
@Test
    void complex_dag_is_allowed() {
        Schema grandfather = createSearchWithName("grandfather");
        Schema father = createSearchWithName("father", grandfather);
        Schema mother = createSearchWithName("mother", grandfather);
        createDocumentReference(father, mother, "wife_ref");
        Schema son = createSearchWithName("son", father, mother);
        Schema daughter = createSearchWithName("daughter", father, mother);
        createDocumentReference(daughter, son, "brother_ref");

        Schema randomGuy1 = createSearchWithName("randomguy1");
        Schema randomGuy2 = createSearchWithName("randomguy2");
        createDocumentReference(randomGuy1, mother, "secret_ref");

        DocumentGraphValidator validator = new DocumentGraphValidator();
        validator.validateDocumentGraph(documentListOf(son, father, grandfather, son, daughter, randomGuy1, randomGuy2));
    }