void (Map<String, String> graph, String node, String... expected) { Set<String> cycles = getAlgorithmsInstance().findCycles(initGraph(graph), node).stream() .map(cycle -> StringUtil.join(cycle, "")) .collect(Collectors.toSet()); assertThat(cycles).containsExactlyInAnyOrder(expected); }