void () { Task task = myRepository.findTask("TEST-001"); assertNotNull(task); runOpenTaskDialog(task); myChangeListManager.waitUntilRefreshed(); LocalTask defaultTask = myTaskManager.findTask(LocalTaskImpl.DEFAULT_TASK_ID); assertNotNull(defaultTask); myTaskManager.activateTask(defaultTask, false); myChangeListManager.waitUntilRefreshed(); assertEquals(defaultTask, myTaskManager.getActiveTask()); LocalTask anotherTask = myTaskManager.findTask("TEST-001"); assertNotNull(anotherTask); LocalChangeList defaultChangeList = myChangeListManager.findChangeList(LocalChangeList.getDefaultName()); assertNotNull(defaultChangeList); LocalChangeList anotherChangeList = myChangeListManager.findChangeList("TEST-001 Summary"); assertNotNull(anotherChangeList); removeChangeList(anotherChangeList); assertEquals(1, anotherTask.getChangeLists().size()); assertEquals(1, defaultTask.getChangeLists().size()); assertEquals(1, myChangeListManager.getChangeLists().size()); assertEquals(defaultTask, myTaskManager.getAssociatedTask(defaultChangeList)); assertEquals(LocalChangeList.getDefaultName(), defaultChangeList.getName()); }