void () { myTaskManager.getState().saveContextOnCommit = true; assertEquals(1, myTaskManager.getLocalTasks().size()); Task task = myRepository.findTask("TEST-001"); assertNotNull(task); assertEquals(1, myChangeListManager.getChangeLists().size()); // default change list should be here runOpenTaskDialog(task); myChangeListManager.waitUntilRefreshed(); assertEquals(2, myTaskManager.getLocalTasks().size()); List<LocalChangeList> copy = myChangeListManager.getChangeLists(); assertEquals(copy.toString(), 2, copy.size()); LocalTask localTask = myTaskManager.getActiveTask(); List<ChangeListInfo> changelists = localTask.getChangeLists(); ChangeListInfo info = changelists.get(0); LocalChangeList changeList = myChangeListManager.getChangeList(info.id); assertNotNull(changeList); List<Change> changes = addChanges(changeList); commitChanges(changeList, changes); assertEquals(2, myTaskManager.getLocalTasks().size()); // no extra task created assertEquals(2, myChangeListManager.getChangeLists().size()); assertEquals(localTask, myTaskManager.getAssociatedTask(changeList)); // association should survive }