public void validateDocumentGraph(List<SDDocumentType> documents) {
        for (SDDocumentType document : documents) {
            validateRoot(document);
        }
    }
@Test
    void combined_inherit_and_ref_cycle_is_forbidden() {
        Throwable exception = assertThrows(DocumentGraphValidator.DocumentGraphException.class, () -> {
            Schema schema1 = createSearchWithName("doc1");
            Schema schema2 = createSearchWithName("doc2", schema1);
            Schema schema3 = createSearchWithName("doc3", schema2);
            createDocumentReference(schema1, schema3, "ref_1");

            DocumentGraphValidator validator = new DocumentGraphValidator();
            validator.validateDocumentGraph(documentListOf(schema1, schema2, schema3));
        });
        assertTrue(exception.getMessage().contains("Document dependency cycle detected: doc1->doc3->doc2->doc1."));
    }