AbstractTaskListPresenter extends AbstractMultiGridPresenter<TaskSummary, V> { public void onTaskDetailsClosed(@Observes BeforeClosePlaceEvent closed) { if (PerspectiveIds.TASK_DETAILS_SCREEN.equals(closed.getPlace().getIdentifier())) { selectedTask = null; } }  abstract void setupDetailBreadcrumb(String detailLabel); @Override void openErrorView(final String tId); @Override Predicate<TaskSummary> getViewErrorsActionCondition(); void getDomainSpecifDataForTasks(final Integer startRange,
                                            final List<TaskSummary> tasksFromDataSet,
                                            final Boolean lastPageExactCount); void releaseTask(final TaskSummary task); void claimTask(final TaskSummary task); void claimAndWorkTask(final TaskSummary task); void resumeTask(final TaskSummary task); void suspendTask(final TaskSummary task); void getMenus(final Consumer<Menus> menusConsumer); @Override void selectSummaryItem(final TaskSummary summary); void onTaskRefreshedEvent(@Observes TaskRefreshedEvent event); void onTaskDetailsClosed(@Observes BeforeClosePlaceEvent closed); void onTaskCompletedEvent(@Observes TaskCompletedEvent event); @Inject void setDataSetQueryHelperDomainSpecific(final DataSetQueryHelper dataSetQueryHelperDomainSpecific); @Inject void setTaskService(final Caller<TaskService> taskService); @Override void setupActiveSearchFilters(); @Override boolean existActiveSearchFilters(); @Override ActiveFilterItem getActiveFilterFromColumnFilter(ColumnFilter columnFilter); String getStatusColumnFilterDescription(ColumnFilter columnFilter); void openProcessInstanceView(final String processInstanceId); void bulkClaim(List<TaskSummary> taskSummaries); void bulkRelease(List<TaskSummary> taskSummaries); void bulkResume(List<TaskSummary> taskSummaries); void bulkSuspend(List<TaskSummary> taskSummaries); void bulkReassign(List<TaskSummary> taskSummaries); @Inject void setTranslationService(TranslationService translationService);  }
@Test public void testOnTaskDetailsClosed() { TaskSummary taskSummary = createTestTaskSummary(TASK_ID, TASK_STATUS_EXITED, ""); getPresenter().selectSummaryItem(taskSummary); assertEquals(taskSummary, getPresenter().getSelectedTask()); getPresenter().onTaskDetailsClosed(newCloseEventMock(PerspectiveIds.TASK_ADMIN_LIST_SCREEN)); assertEquals(taskSummary, getPresenter().getSelectedTask()); getPresenter().onTaskDetailsClosed(newCloseEventMock(PerspectiveIds.TASK_DETAILS_SCREEN)); assertNull(getPresenter().getSelectedTask()); }