RequestListPresenter extends AbstractMultiGridPresenter<RequestSummary, RequestListPresenter.RequestListView> { public void setupDetailBreadcrumb(String detailLabel) { setupDetailBreadcrumb(placeManager, commonConstants.Manage_Jobs(), detailLabel, PerspectiveIds.JOB_DETAILS_SCREEN); } RequestListPresenter();  RequestListPresenter(RequestListViewImpl view,
                                Caller<ExecutorService> executorServices,
                                DataSetQueryHelper dataSetQueryHelper,
                                Event<RequestChangedEvent> requestChangedEvent,
                                Event<JobSelectedEvent> jobSelectedEvent,
                                PlaceManager placeManager); @Inject void setFilterSettingsManager(final JobListFilterSettingsManager filterSettingsManager); @Override void createListBreadcrumb(); void setupDetailBreadcrumb(String detailLabel); void cancelRequest(final String deploymentId,
                              final Long requestId); void requeueRequest(final String deploymentId,
                               final Long requestId); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); @Override void selectSummaryItem(final RequestSummary job); void requestCreated(@Observes RequestChangedEvent event); @Override void setupActiveSearchFilters(); @Override boolean existActiveSearchFilters(); @Override ActiveFilterItem getActiveFilterFromColumnFilter(ColumnFilter columnFilter); String getStatusColumnFilterDescription(ColumnFilter columnFilter); void openProcessInstanceView(final String processInstanceId); Predicate<RequestSummary> getCancelActionCondition(); Predicate<RequestSummary> getRequeueActionCondition(); Predicate<RequestSummary> getViewProcessActionCondition(); void bulkCancel(List<RequestSummary> jobsSelected); void bulkRequeue(List<RequestSummary> jobsSelected);  }
@Test public void testSetupDetailBreadcrumb() { String detailLabel = "detailLabel"; String detailScreenId = "screenId"; PlaceManager placeManagerMock = mock(PlaceManager.class); presenter.setPlaceManager(placeManagerMock); presenter.setupDetailBreadcrumb(placeManagerMock, commonConstants.Manage_Jobs(), detailLabel, detailScreenId); ArgumentCaptor<Command> captureCommand = ArgumentCaptor.forClass(Command.class); verify(breadcrumbs).clearBreadcrumbs(PERSPECTIVE_ID); verify(breadcrumbs).addBreadCrumb(eq(PERSPECTIVE_ID), eq(commonConstants.Home()), captureCommand.capture()); captureCommand.getValue().execute(); verify(placeManagerMock).goTo(PerspectiveIds.HOME); verify(breadcrumbs).addBreadCrumb(eq(PERSPECTIVE_ID), eq(commonConstants.Manage_Jobs()), captureCommand.capture()); captureCommand.getValue().execute(); verify(placeManagerMock).closePlace(detailScreenId); verify(breadcrumbs).addBreadCrumb(eq(PERSPECTIVE_ID), eq(detailLabel), eq(Commands.DO_NOTHING)); }