AbstractTaskListView extends AbstractMultiGridView<TaskSummary, P> implements AbstractTaskListPresenter.TaskListView<P> { @Override public void initSelectionModel(final ListTable<TaskSummary> extendedPagedTable) { super.initSelectionModel(extendedPagedTable); final RowStyles<TaskSummary> selectedStyles = (TaskSummary row, int rowIndex) -> { if (TASK_STATUS_COMPLETED.equals(row.getTaskStatus())) { return HumanTaskResources.INSTANCE.css().taskCompleted(); } return null; }; extendedPagedTable.setRowStyles(selectedStyles); }  @Override List<String> getBannedColumns(); @Override String getEmptyTableCaption(); @Override void initSelectionModel(final ListTable<TaskSummary> extendedPagedTable); @Override List<AnchorListItem> getBulkActionsItems(ExtendedPagedTable<TaskSummary> extendedPagedTable); @Override void initColumns(ListTable<TaskSummary> extendedPagedTable); @Inject void setTranslationService(TranslationService translationService);  }
@Test public void testStylesNotAppliedDependingOnPriority() { final ListTable<TaskSummary> currentListGrid = spy(new ListTable<>(new GridGlobalPreferences())); getView().initSelectionModel(currentListGrid); final ArgumentCaptor<RowStyles> rowStylesApplied = ArgumentCaptor.forClass(RowStyles.class); verify(currentListGrid).setRowStyles(rowStylesApplied.capture()); assertNull(rowStylesApplied.getValue().getStyleNames(TaskSummary.builder() .status(TASK_STATUS_READY.getIdentifier()) .priority(1) .build(), 1)); assertNull(rowStylesApplied.getValue().getStyleNames(TaskSummary.builder() .status(TASK_STATUS_READY.getIdentifier()) .priority(3) .build(), 1)); assertNull(rowStylesApplied.getValue().getStyleNames(TaskSummary.builder() .status(TASK_STATUS_READY.getIdentifier()) .priority(10) .build(), 1)); assertEquals(HumanTaskResources.INSTANCE.css().taskCompleted(), rowStylesApplied.getValue().getStyleNames(TaskSummary.builder() .status(TASK_STATUS_COMPLETED.getIdentifier()) .priority(10) .build(), 1)); }