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); addChangeList("Default (1)"); assertEquals(1, anotherTask.getChangeLists().size()); assertEquals(2, defaultTask.getChangeLists().size()); assertEquals(3, myChangeListManager.getChangeLists().size()); LocalChangeList defaultChangeListActive = myChangeListManager.findChangeList(LocalChangeList.getDefaultName()); assertNotNull(defaultChangeListActive); assertTrue(myChangeListManager.getDefaultListName(), defaultChangeListActive.isDefault()); LocalChangeList defaultChangeListInactive = myChangeListManager.findChangeList("Default (1)"); assertNotNull(defaultChangeListInactive); LocalChangeList anotherChangeList = myChangeListManager.findChangeList("TEST-001 Summary"); assertNotNull(anotherChangeList); assertEquals(defaultTask, myTaskManager.getAssociatedTask(defaultChangeListActive)); assertEquals(LocalChangeList.getDefaultName(), defaultChangeListActive.getName()); assertEquals(defaultTask, myTaskManager.getAssociatedTask(defaultChangeListInactive)); assertEquals("Default (1)", defaultChangeListInactive.getName()); assertEquals(anotherTask, myTaskManager.getAssociatedTask(anotherChangeList)); assertEquals("TEST-001 Summary", anotherChangeList.getName()); }