@Test
public void testConjureRevisitedImports() throws IOException {

    // create a hierarchy of dependencies such that a significant amount of files is visited repeatedly
    // each file depends on all files from the previous level
    List<String> inners = ImmutableList.of(
            "innerOne",
            "innerTwo",
            "innerThree",
            "innerFour",
            "innerFive",
            "innerSix",
            "innerSeven",
            "innerEight",
            "innerNine",
            "innerTen");
    List<String> mid = ImmutableList.of("midOne", "midTwo", "midThree", "midFour", "midFive");
    List<String> top = ImmutableList.of("topOne", "topTwo", "topThree", "topFour", "topFive", "topSix");
    String root = "root";
    generateFiles(inners, ImmutableList.of());
    generateFiles(mid, inners);
    generateFiles(top, mid);
    generateFiles(ImmutableList.of(root), top);
    ConjureSourceFile result = ConjureParser.parse(
            temporaryFolder.getRoot().toPath().resolve(root + ".yml").toFile());
    assertThat(result.types().conjureImports()).isNotEmpty();
}