void () { String file = createFile("dir/a.txt"); JpsArtifact a = addArtifact(root().parentDirCopy(file)); buildAll(); String oldOutput = a.getOutputPath(); assertNotNull(oldOutput); assertOutput(oldOutput, fs().file("a.txt")); String newOutput = PathUtil.getParentPath(oldOutput) + "/a2"; a.setOutputPath(newOutput); buildAll(); assertOutput(newOutput, fs().file("a.txt")); assertOutput(oldOutput, fs()); buildAllAndAssertUpToDate(); }