@Test public void testCheckCycles_Empty() { GraphCycleDetector instance = new GraphCycleDetector(); Set<String> cycles = instance.checkCycles(); assertThat(cycles).isEmpty(); }
public Set<String> checkCycles() { removeNodesWithoutParents(); removeNodesWithoutChildren(); return getCycles(); }
GraphCycleDetector { public Set<String> checkCycles() { removeNodesWithoutParents(); removeNodesWithoutChildren(); return getCycles(); } }
GraphCycleDetector { public Set<String> checkCycles() { removeNodesWithoutParents(); removeNodesWithoutChildren(); return getCycles(); }  }
GraphCycleDetector { public Set<String> checkCycles() { removeNodesWithoutParents(); removeNodesWithoutChildren(); return getCycles(); }  void addRelations(String child, Collection<String> parents); void removeRelations(String child, Collection<String> parents); Set<String> checkCycles(); }
GraphCycleDetector { public Set<String> checkCycles() { removeNodesWithoutParents(); removeNodesWithoutChildren(); return getCycles(); }  void addRelations(String child, Collection<String> parents); void removeRelations(String child, Collection<String> parents); Set<String> checkCycles();  }