void () { String file = createFile("d/a.txt", "a"); JpsArtifact a = addArtifact(root().parentDirCopy(file)); buildAll(); assertOutput(a, fs().file("a.txt", "a")); a.setRootElement(root().dir("dir").parentDirCopy(file).buildElement()); buildAll(); assertOutput(a, fs().dir("dir").file("a.txt", "a")); buildAllAndAssertUpToDate(); }