@Override
 public void removeTask(LocalTask task) {
   if (task.isDefault()) return;
   if (myActiveTask.equals(task)) {
     activateTask(myTasks.get(LocalTaskImpl.DEFAULT_TASK_ID), true);
   }
   myTasks.remove(task.getId());
   myDispatcher.getMulticaster().taskRemoved(task);
   myContextManager.removeContext(task);
 }
 public void testCreateComment() throws Exception {
   myRepository.setShouldFormatCommitMessage(true);
   myRepository.setCommitMessageFormat("{id} {summary} {number} {project}");
   Task task = myRepository.findTask("TEST-001");
   assertNotNull(task);
   activateAndCreateChangelist(task);
   myChangeListManager.waitUntilRefreshed();
   LocalTask localTask = myTaskManager.getActiveTask();
   assertNotNull(localTask);
   assertEquals("TEST-001", localTask.getId());
   List<ChangeListInfo> lists = localTask.getChangeLists();
   assertEquals(1, lists.size());
   assertEquals("TEST-001 Summary 001 TEST", lists.get(0).comment);
 }