void () { enableSilentOperation(VcsConfiguration.StandardConfirmation.ADD); final VirtualFile file = createFileInCommand("a.txt", "old content"); final VirtualFile fileB = createFileInCommand("b.txt", "old content"); final VirtualFile fileC = createFileInCommand("c.txt", "old content"); final VirtualFile fileD = createFileInCommand("d.txt", "old content"); final LocalChangeList list = changeListManager.addChangeList("test", null); final LocalChangeList toBeDeletedList = changeListManager.addChangeList("toBeDeletedList", null); changeListManager.moveChangesTo(list, changeListManager.getChange(file), changeListManager.getChange(fileB)); changeListManager.moveChangesTo(toBeDeletedList, changeListManager.getChange(fileC), changeListManager.getChange(fileD)); changeListManager.ensureUpToDate(); final String targetName = "target"; final String finalName = "final list name"; myScheme.doTest(() -> { final LocalChangeList target = changeListManager.addChangeList(targetName, null); changeListManager.moveChangesTo(target, changeListManager.getChange(file), changeListManager.getChange(fileB)); checkFilesAreInList(targetName, file, fileB); changeListManager.editName(targetName, finalName); checkFilesAreInList(finalName, file, fileB); changeListManager.removeChangeList(toBeDeletedList.getName()); checkFilesAreInList(myDefaulListName, fileC, fileD); changeListManager.moveChangesTo(LocalChangeList.createEmptyChangeList(myProject, finalName), changeListManager.getChange(fileC)); checkFilesAreInList(finalName, file, fileB, fileC); checkFilesAreInList(myDefaulListName, fileD); }); checkFilesAreInList(finalName, file, fileB, fileC); checkFilesAreInList(myDefaulListName, fileD); changeListManager.ensureUpToDate(); checkFilesAreInList(finalName, file, fileB, fileC); checkFilesAreInList(myDefaulListName, fileD); }