void (Map<Chunk<String>, Set<Chunk<String>>> expectedArcs, Graph<Chunk<String>> graph) { for (Chunk<String> chunk : graph.getNodes()) { List<Chunk<String>> ins = ContainerUtil.collect(graph.getIn(chunk)); Set<Chunk<String>> expectedIns = expectedArcs.get(chunk); assertEquals(expectedIns.size(), ins.size()); assertEquals(expectedIns, new HashSet<>(ins)); } }