OntologyHierarchiesPresenterImpl implements OntologyHierarchiesView.Presenter,
                                                         OntologyHierarchySelectionChangedEvent.OntologyHierarchySelectionChangedEventHandler,
                                                         AppRatingSelected.AppRatingSelectedHandler,
                                                         AppRatingDeselected.AppRatingDeselectedHandler,
                                                         AppFavoriteSelectedEvent.AppFavoriteSelectedEventHandler,
                                                         DetailsHierarchyClicked.DetailsHierarchyClickedHandler,
                                                         DetailsCategoryClicked.DetailsCategoryClickedHandler { @Override public void onDetailsHierarchyClicked(DetailsHierarchyClicked event) { OntologyHierarchy hierarchy = event.getHierarchy(); checkNotNull(hierarchy); String id = ontologyUtil.getOrCreateHierarchyPathTag(hierarchy); for (int i = 0; i < viewTabPanel.getWidgetCount(); i++) { Tree<OntologyHierarchy, String> tree = ((Tree)viewTabPanel.getWidget(i)); OntologyHierarchy selectedHierarchy = tree.getStore().findModelWithKey(id); if (selectedHierarchy != null) { viewTabPanel.setActiveWidget(tree); tree.scrollIntoView(selectedHierarchy); tree.getSelectionModel().select(selectedHierarchy, true); break; } } } @Inject  OntologyHierarchiesPresenterImpl(OntologyHierarchiesViewFactory viewFactory,
                                            OntologyServiceFacade serviceFacade,
                                            EventBus eventBus,
                                            OntologyHierarchiesView.OntologyHierarchiesAppearance appearance); @Override void go(final DETabPanel tabPanel); @Override void setViewDebugId(String baseID); @Override void onAppInfoSelected(final AppInfoSelectedEvent event); @Override void onAppSearchResultLoad(AppSearchResultLoadEvent event); @Override void onOntologyHierarchySelectionChanged(OntologyHierarchySelectionChangedEvent event); @Override void onAppRatingDeselected(AppRatingDeselected event); @Override void onAppRatingSelected(AppRatingSelected event); @Override void onAppFavoriteSelected(AppFavoriteSelectedEvent event); @Override void onDetailsHierarchyClicked(DetailsHierarchyClicked event); @Override void onDetailsCategoryClicked(DetailsCategoryClicked event); @Override HandlerRegistration addOntologyHierarchySelectionChangedEventHandler(
            OntologyHierarchySelectionChangedEvent.OntologyHierarchySelectionChangedEventHandler handler);  }
@Test public void testOnDetailsHierarchyClicked() { DetailsHierarchyClicked eventMock = mock(DetailsHierarchyClicked.class); when(eventMock.getHierarchy()).thenReturn(hierarchyMock); uut.onDetailsHierarchyClicked(eventMock); verify(tabPanelMock).getWidget(anyInt()); verify(hierarchyTreeStoreMock).findModelWithKey(anyString()); verify(tabPanelMock).setActiveWidget(eq(hierarchyTreeMock)); verify(treeSelectionModelMock).select(eq(hierarchyMock), anyBoolean()); }