TaskListPresenter extends AbstractTaskListPresenter<TaskListViewImpl> { @Override protected Predicate<TaskSummary> getReleaseActionCondition() { return task -> task.getActualOwner() != null && task.getActualOwner().equals(identity.getIdentifier()) && super.getReleaseActionCondition().test(task); }  @WorkbenchPartTitle String getTitle(); @WorkbenchPartTitleDecoration IsWidget getTitleDecorator(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); @Override void createListBreadcrumb(); @Override void setupDetailBreadcrumb(String detailLabel); @Inject void setFilterSettingsManager(final TaskListFilterSettingsManager filterSettingsManager); Predicate<String> getFilterEventPredicate();  }
@Test public void userShouldNotBeAbleToReleaseTasksOwnedByOthers() { assertFalse(getPresenter().getReleaseActionCondition().test(TaskSummary.builder().actualOwner("userx").status(TASK_STATUS_RESERVED.getIdentifier()).build())); assertFalse(getPresenter().getReleaseActionCondition().test(TaskSummary.builder().actualOwner("userx").status(TASK_STATUS_IN_PROGRESS.getIdentifier()).build())); }