AbstractScreenListPresenter extends AbstractListPresenter<T> { public void setupListBreadcrumb(PlaceManager placeManager, String listLabel) { breadcrumbs.clearBreadcrumbs(getPerspectiveId()); breadcrumbs.addBreadCrumb(getPerspectiveId(), Constants.INSTANCE.Home(), () -> placeManager.goTo(PerspectiveIds.HOME)); breadcrumbs.addBreadCrumb(getPerspectiveId(), listLabel, Commands.DO_NOTHING); }  @WorkbenchPartTitle String getTitle(); @WorkbenchPartTitleDecoration IsWidget getTitleDecorator(); @OnOpen void onOpen(); void onDetailScreenClosed(@Observes ClosePlaceEvent closed); @OnFocus void onFocus(); @OnStartup void onStartup(final PlaceRequest place); String getPerspectiveId(); @Inject void setIdentity(final User identity); @Inject void setServerTemplateSelectorMenuBuilder(final ServerTemplateSelectorMenuBuilder serverTemplateSelectorMenuBuilder); void onServerTemplateSelected(@Observes final ServerTemplateSelected serverTemplateSelected); String getSelectedServerTemplate(); void setSelectedServerTemplate(final ServerTemplate serverTemplate); abstract void createListBreadcrumb(); void setupListBreadcrumb(PlaceManager placeManager,
                                    String listLabel); void setupDetailBreadcrumb(PlaceManager placeManager,
                                      String listLabel,
                                      String detailLabel,
                                      String detailScreenId); void setUberfireBreadcrumbs(UberfireBreadcrumbs breadcrumbs); void setPerspectiveManager(PerspectiveManager perspectiveManager); void setPlaceManager(PlaceManager placeManager); void setEmptyResults();  }
@Test public void testListBreadCrumb() { String listLabel = "listLabel"; PlaceManager placeManagerMock = mock(PlaceManager.class); presenter.setupListBreadcrumb(placeManagerMock, listLabel); ArgumentCaptor<Command> captureCommand = ArgumentCaptor.forClass(Command.class); verify(breadcrumbsMock).clearBreadcrumbs(PERSPECTIVE_ID); verify(breadcrumbsMock).addBreadCrumb(eq(PERSPECTIVE_ID), eq(Constants.INSTANCE.Home()), captureCommand.capture()); captureCommand.getValue().execute(); verify(placeManagerMock).goTo(PerspectiveIds.HOME); verify(breadcrumbsMock).addBreadCrumb(eq(PERSPECTIVE_ID), eq(listLabel), eq(Commands.DO_NOTHING)); verifyNoMoreInteractions(breadcrumbsMock); }