void () { String dir1 = PathUtil.getParentPath(createFile("dir1/a.txt", "a")); String dir2 = PathUtil.getParentPath(createFile("dir2/b.txt", "b")); JpsArtifact a = addArtifact(root().dirCopy(dir1)); buildAll(); assertOutput(a, fs().file("a.txt", "a")); a.getRootElement().addChild(JpsPackagingElementFactory.getInstance().createDirectoryCopy(dir2)); buildAll(); assertOutput(a, fs().file("a.txt", "a").file("b.txt", "b")); assertDeletedAndCopied("out/artifacts/a/a.txt", "dir1/a.txt", "dir2/b.txt"); buildAllAndAssertUpToDate(); }