@Test public void simple_ref_dag_is_allowed() { Search advertiserSearch = createSearchWithName("advertiser"); Search campaignSearch = createSearchWithName("campaign"); Search adSearch = createSearchWithName("ad"); createDocumentReference(adSearch, advertiserSearch, "advertiser_ref"); createDocumentReference(adSearch, campaignSearch, "campaign_ref"); DocumentGraphValidator validator = new DocumentGraphValidator(); validator.validateDocumentGraph(documentListOf(advertiserSearch, campaignSearch, adSearch)); }
public void validateDocumentGraph(List<SDDocumentType> documents) { for (SDDocumentType document : documents) { validateRoot(document); } }
DocumentGraphValidator { public void validateDocumentGraph(List<SDDocumentType> documents) { for (SDDocumentType document : documents) { validateRoot(document); } } }
DocumentGraphValidator { public void validateDocumentGraph(List<SDDocumentType> documents) { for (SDDocumentType document : documents) { validateRoot(document); } }  }
DocumentGraphValidator { public void validateDocumentGraph(List<SDDocumentType> documents) { for (SDDocumentType document : documents) { validateRoot(document); } }  void validateDocumentGraph(List<SDDocumentType> documents); }
DocumentGraphValidator { public void validateDocumentGraph(List<SDDocumentType> documents) { for (SDDocumentType document : documents) { validateRoot(document); } }  void validateDocumentGraph(List<SDDocumentType> documents);  }