TaskManager { public void moveTask(AbstractTask task, String direction) { if (!tasks.contains(task)) { return; } int index = tasks.indexOf(task); if (direction == "up" && index > 0) { tasks.remove(task); tasks.addFirst(task); } else if (direction == "down" && index < (tasks.size() - 1)) { tasks.remove(task); tasks.addLast(task); } } TaskManager(); void setController(TaskViewerController controller); void refresh(); void setInstance(TaskManager taskManager); static TaskManager getInstance(); void addTask(AbstractTask task); @SuppressWarnings("unchecked") List<AbstractTask> listTasks(); void moveTask(AbstractTask task, String direction); boolean contains(AbstractTask task); boolean conflictingTasks(AbstractTask task); boolean hasTasks(); void removeTask(AbstractTask task); AbstractTask getTask(Agent agent); void updateTaskRoles();  }
@Test public void moveTaskTest() { }