NavigationExplorerScreen { void onNavTreeLoaded(@Observes NavTreeLoadedEvent event) { NavTree navTree = event.getNavTree(); if (navTree != null) { navTreeEditor.edit(navTree); } } NavigationExplorerScreen(); @Inject  NavigationExplorerScreen(NavigationManager navigationManager,
                                 NavTreeEditor navTreeEditor,
                                 ContentManagerI18n i18n,
                                 Event<NotificationEvent> workbenchNotification); @WorkbenchPartTitle String getTitle(); @WorkbenchPartView IsElement getView(); @WorkbenchMenu void getMenus(final Consumer<Menus> menusConsumer); NavTreeEditor getNavTreeEditor(); void createNewNavigationTree(); void onNavTreeChanged(@Observes final NavTreeChangedEvent event); static final String SCREEN_ID; }
@Test public void testOnNavTreeLoaded() { navigationExplorerScreen.init(); navigationExplorerScreen.onNavTreeLoaded(new NavTreeLoadedEvent(navTree)); verify(navTreeEditor).edit(navTree); }