AbstractTaskListPresenter extends AbstractMultiGridPresenter<TaskSummary, V> { protected Predicate<TaskSummary> getCompleteActionCondition() { return task -> task.getActualOwner() != null && TaskStatus.TASK_STATUS_IN_PROGRESS.equals(task.getTaskStatus()); }  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 testCompleteActionCondition() { assertTrue(getPresenter().getCompleteActionCondition().test(TaskSummary.builder().actualOwner(identity.getIdentifier()).status(TASK_STATUS_IN_PROGRESS.getIdentifier()).build())); assertFalse(getPresenter().getCompleteActionCondition().test(TaskSummary.builder().actualOwner(identity.getIdentifier()).status(TASK_STATUS_READY.getIdentifier()).build())); }