ProcessInstanceListViewImpl extends AbstractMultiGridView<ProcessInstanceSummary, ProcessInstanceListPresenter> implements ProcessInstanceListPresenter.ProcessInstanceListView { protected AnchorListItem getBulkAbort(final ExtendedPagedTable<ProcessInstanceSummary> extendedPagedTable) { final AnchorListItem bulkAbortNavLink = GWT.create(AnchorListItem.class); bulkAbortNavLink.setText(constants.Bulk_Abort()); bulkAbortNavLink.setIcon(IconType.BAN); bulkAbortNavLink.setIconFixedWidth(true); bulkAbortNavLink.addClickHandler(event -> confirmPopup.show(constants.Abort_Confirmation(), constants.Abort(), constants.Abort_Process_Instances(), getAbortCommand(extendedPagedTable)) ); return bulkAbortNavLink; }  @Override List<String> getInitColumns(); @Override List<String> getBannedColumns(); @Override String getEmptyTableCaption(); @Override List<AnchorListItem> getBulkActionsItems(ExtendedPagedTable<ProcessInstanceSummary> extendedPagedTable); @Override void initColumns(final ListTable<ProcessInstanceSummary> extendedPagedTable);  }
@Test public void testBulkAbort() { doAnswer(invocation -> { ClickHandler handler = (ClickHandler) invocation.getArguments()[0]; handler.onClick(mock(ClickEvent.class)); return null; }).when(anchorListItem).addClickHandler(any()); final ExtendedPagedTable table = mock(ExtendedPagedTable.class); view.getBulkAbort(table); ArgumentCaptor<Command> captor = ArgumentCaptor.forClass(Command.class); verify(confirmPopup).show(any(), any(), any(), captor.capture()); captor.getValue().execute(); verify(presenter).bulkAbort(any()); }