TasksPresenter implements TasksContract.Presenter { @Override public void openTaskDetails(@NonNull Task requestedTask) { checkNotNull(requestedTask, "requestedTask cannot be null!"); mTasksView.showTaskDetailsUi(requestedTask.getId()); } TasksPresenter(@NonNull TasksRepository tasksRepository, @NonNull TasksContract.View tasksView); @Override void start(); @Override void result(int requestCode, int resultCode); @Override void loadTasks(boolean forceUpdate); @Override void addNewTask(); @Override void openTaskDetails(@NonNull Task requestedTask); @Override void completeTask(@NonNull Task completedTask); @Override void activateTask(@NonNull Task activeTask); @Override void clearCompletedTasks(); @Override void setFiltering(TasksFilterType requestType); @Override TasksFilterType getFiltering();  }
@Test public void clickOnTask_ShowsDetailUi() { Task requestedTask = new Task("Details Requested", "For this task"); mTasksPresenter.openTaskDetails(requestedTask); verify(mTasksView).showTaskDetailsUi(any(String.class)); }