TaskDetailPresenter implements TaskDetailContract.Presenter { @Override public void deleteTask() { mTasksRepository.deleteTask(mTaskId); mTaskDetailView.showTaskDeleted(); } TaskDetailPresenter(@Nullable String taskId,
                               @NonNull TasksRepository tasksRepository,
                               @NonNull TaskDetailContract.View taskDetailView); @Override void start(); @Override void editTask(); @Override void deleteTask(); @Override void completeTask(); @Override void activateTask();  }
@Test public void deleteTask() { Task task = new Task(TITLE_TEST, DESCRIPTION_TEST); mTaskDetailPresenter = new TaskDetailPresenter( task.getId(), mTasksRepository, mTaskDetailView); mTaskDetailPresenter.deleteTask(); verify(mTasksRepository).deleteTask(task.getId()); verify(mTaskDetailView).showTaskDeleted(); }