OntologyHierarchiesPresenterImpl implements OntologyHierarchiesView.Presenter,
                                                         OntologyHierarchySelectionChangedEvent.OntologyHierarchySelectionChangedEventHandler,
                                                         AppRatingSelected.AppRatingSelectedHandler,
                                                         AppRatingDeselected.AppRatingDeselectedHandler,
                                                         AppFavoriteSelectedEvent.AppFavoriteSelectedEventHandler,
                                                         DetailsHierarchyClicked.DetailsHierarchyClickedHandler,
                                                         DetailsCategoryClicked.DetailsCategoryClickedHandler { @Override public void onDetailsCategoryClicked(DetailsCategoryClicked event) { AppCategory category = event.getCategory(); checkNotNull(category); for (int i = 0 ; i < viewTabPanel.getWidgetCount() ; i++) { Tree<AppCategory, String> tree = ((Tree)viewTabPanel.getWidget(i)); AppCategory selectedCategory = tree.getStore().findModelWithKey(category.getId()); if (selectedCategory != null) { viewTabPanel.setActiveWidget(tree); tree.scrollIntoView(selectedCategory); tree.getSelectionModel().select(selectedCategory, 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 testOnDetailsCategoryClicked() { DetailsCategoryClicked eventMock = mock(DetailsCategoryClicked.class); when(eventMock.getCategory()).thenReturn(appCategoryMock); when(tabPanelMock.getWidget(anyInt())).thenReturn(categoryTreeMock); uut.onDetailsCategoryClicked(eventMock); verify(tabPanelMock).getWidget(anyInt()); verify(categoryTreeStoreMock).findModelWithKey(anyString()); verify(tabPanelMock).setActiveWidget(eq(categoryTreeMock)); verify(categoryTreeSelectionModelMock).select(eq(appCategoryMock), anyBoolean()); }