TaskDetailPresenter implements TaskDetailContract.Presenter { @Override public void activateTask() { if (null == mTaskId || mTaskId.isEmpty()) { mTaskDetailView.showMissingTask(); return; } mUseCaseHandler.execute(mActivateTask, new ActivateTask.RequestValues(mTaskId), new UseCase.UseCaseCallback<ActivateTask.ResponseValue>() { @Override public void onSuccess(ActivateTask.ResponseValue response) { mTaskDetailView.showTaskMarkedActive(); } @Override public void onError(Error error) { } }); } TaskDetailPresenter(@NonNull UseCaseHandler useCaseHandler,
            @Nullable String taskId,
            @NonNull TaskDetailContract.View taskDetailView,
            @NonNull GetTask getTask,
            @NonNull CompleteTask completeTask,
            @NonNull ActivateTask activateTask,
            @NonNull DeleteTask deleteTask); @Override void start(); @Override void editTask(); @Override void deleteTask(); @Override void completeTask(); @Override void activateTask();  }
@Test public void activateTask() { Task task = new Task(TITLE_TEST, DESCRIPTION_TEST, true); mTaskDetailPresenter = givenTaskDetailPresenter(task.getId()); mTaskDetailPresenter.start(); mTaskDetailPresenter.activateTask(); verify(mTasksRepository).activateTask(task.getId()); verify(mTaskDetailView).showTaskMarkedActive(); }