void () { myTaskManager.getState().saveContextOnCommit = true; myTaskManager.getState().taskHistoryLength = 2; LocalTaskImpl first = myTaskManager.createLocalTask("First"); myTaskManager.addTask(first); assertEquals(2, myTaskManager.getLocalTasks().size()); LocalChangeList changeList = addChangeList("New Changelist"); List<Change> changes = addChanges(changeList); commitChanges(changeList, changes); assertEquals(2, myTaskManager.getLocalTasks().size()); assertTrue(ContainerUtil.exists(myTaskManager.getLocalTasks(), task -> task.getSummary().equals("First"))); }