void () { LocalTask activeTask = myTaskManager.getActiveTask(); addChanges(myChangeListManager.getDefaultChangeList()); myTaskManager.getState().shelveChanges = true; LocalTaskImpl task = new LocalTaskImpl("id", "summary"); runOpenTaskDialog(task); assertEquals(dumpChangeListManager(), activeTask.getSummary(), activeTask.getShelfName()); List<ShelvedChangeList> lists = ShelveChangesManager.getInstance(getProject()).getShelvedChangeLists(); assertTrue(lists.stream().anyMatch(list -> list.DESCRIPTION.equals(activeTask.getShelfName()))); assertEmpty(myChangeListManager.getDefaultChangeList().getChanges()); //avoid overwrite file conflict VirtualFile virtualFile = myFixture.getTempDirFixture().getFile(TEST_FILE); if (virtualFile.exists()) { VfsTestUtil.deleteFile(virtualFile); } myTaskManager.activateTask(activeTask, true); Collection<Change> changes = myChangeListManager.getDefaultChangeList().getChanges(); assertNotEmpty(changes); }