void () { VirtualFile file = createFile("file.txt", "a"); final Artifact a = addArtifact(root().archive("myArchive").file(file)); make(a); assertOutput(a, fs().archive("myArchive").file("file.txt")); WriteAction.runAndWait(() -> { ModifiableArtifactModel model = getArtifactManager().createModifiableModel(); CompositePackagingElement<?> rootElement = model.getOrCreateModifiableArtifact(a).getRootElement(); ArchivePackagingElement element = (ArchivePackagingElement)rootElement.getChildren().get(0); element.rename("AnotherName"); model.commit(); }); make(a); assertOutput(a, fs().archive("AnotherName").file("file.txt")); }