UberfireBreadcrumbs { public void clearBreadcrumbsAndToolBars(final String associatedPerspective) { breadcrumbsPerPerspective.put(associatedPerspective, new ArrayList<>()); breadcrumbsToolBarPerPerspective.remove(associatedPerspective); } @Inject  UberfireBreadcrumbs(UberfireBreadcrumbsContainer uberfireBreadcrumbsContainer,
                               ManagedInstance<DefaultBreadcrumbsPresenter> breadcrumbsPresenters,
                               PlaceManager placeManager,
                               View view); @PostConstruct void createBreadcrumbs(); void clearBreadcrumbs(final String associatedPerspective); void clearBreadcrumbsAndToolBars(final String associatedPerspective); void addBreadCrumb(final String associatedPerspective,
                              final String breadCrumbLabel,
                              final Command command); void addBreadCrumb(final String associatedPerspective,
                              final String breadCrumbLabel,
                              final Command command,
                              final boolean removeDeepLevelBreadcrumbsAfterActivation); void addBreadCrumb(final String associatedPerspective,
                              final String breadCrumbLabel,
                              final PlaceRequest associatedPlaceRequest); void addBreadCrumb(final String associatedPerspective,
                              final String breadCrumbLabel,
                              final PlaceRequest associatedPlaceRequest,
                              final Command command); void addBreadCrumb(final String associatedPerspective,
                              final String breadCrumbLabel,
                              final PlaceRequest associatedPlaceRequest,
                              final Command command,
                              final boolean removeDeepLevelBreadcrumbsAfterActivation); void addBreadCrumb(final String associatedPerspective,
                              final BreadcrumbPresenter breadCrumbPresenter); void addToolbar(final String associatedPerspective,
                           final Element toolbar);  }
@Test public void clearBreadcrumbsAndToolBarsTest() { uberfireBreadcrumbs.currentPerspective = "myperspective"; uberfireBreadcrumbs.addToolbar("myperspective", mock(Element.class)); uberfireBreadcrumbs.addBreadCrumb("myperspective", "label", new DefaultPlaceRequest("screen")); assertFalse(uberfireBreadcrumbs.breadcrumbsPerPerspective.get("myperspective").isEmpty()); assertFalse(uberfireBreadcrumbs.breadcrumbsToolBarPerPerspective.isEmpty()); uberfireBreadcrumbs.clearBreadcrumbsAndToolBars("myperspective"); assertTrue(uberfireBreadcrumbs.breadcrumbsPerPerspective.get("myperspective").isEmpty()); assertTrue(uberfireBreadcrumbs.breadcrumbsToolBarPerPerspective.isEmpty()); }