void () { myTaskManager.getState().saveContextOnCommit = true; assertEquals(1, myTaskManager.getLocalTasks().size()); assertEquals(1, myChangeListManager.getChangeLists().size()); LocalChangeList changeList = addChangeList("New Changelist"); assertEquals(1, myTaskManager.getLocalTasks().size()); assertEquals(2, myChangeListManager.getChangeLists().size()); List<Change> changes = addChanges(changeList); commitChanges(changeList, changes); assertEquals(2, myTaskManager.getLocalTasks().size()); // extra task created assertEquals(2, myChangeListManager.getChangeLists().size()); assertTrue(ContainerUtil.exists(myTaskManager.getLocalTasks(), task -> task.getSummary().equals("New Changelist"))); }