### Question:
ExplorerMenu { public void refresh() { if (activeOptions.isTreeNavigatorVisible()) { view.showTreeNav(); } else { view.showBreadcrumbNav(); } if (activeOptions.isTechnicalViewActive()) { view.showTechViewIcon(); view.hideBusinessViewIcon(); } else { view.showBusinessViewIcon(); view.hideTechViewIcon(); } if (activeOptions.canShowTag()) { view.showTagFilterIcon(); } else { view.hideTagFilterIcon(); } } ExplorerMenu(); @Inject  ExplorerMenu(final ExplorerMenuView view,
                        final ActiveContextOptions activeOptions,
                        final WorkspaceProjectContext projectContext); Menus asMenu(); void refresh(); void addRefreshCommand(Command refreshCommand); void addUpdateCommand(Command updateCommand); void onBusinessViewSelected(); void onTechViewSelected(); void onTreeExplorerSelected(); void onBreadCrumbExplorerSelected(); void onShowTagFilterSelected(); void onArchiveActiveProject(); void onArchiveActiveRepository(); void onRefresh();  }### Answer:
@Test public void testRefreshVersion1() throws Exception { when(activeOptions.isTechnicalViewActive()).thenReturn(true); when(activeOptions.isTreeNavigatorVisible()).thenReturn(true); when(activeOptions.canShowTag()).thenReturn(true); menu.refresh(); verify(view).showTreeNav(); verify(view).showTechViewIcon(); verify(view).hideBusinessViewIcon(); verify(view).showTagFilterIcon(); verify(view, never()).showBreadcrumbNav(); verify(view, never()).showBusinessViewIcon(); verify(view, never()).hideTechViewIcon(); verify(view, never()).hideTagFilterIcon(); }
@Test public void testRefreshVersion2() throws Exception { when(activeOptions.isTechnicalViewActive()).thenReturn(false); when(activeOptions.isTreeNavigatorVisible()).thenReturn(false); when(activeOptions.canShowTag()).thenReturn(false); menu.refresh(); verify(view, never()).showTreeNav(); verify(view, never()).showTechViewIcon(); verify(view, never()).hideBusinessViewIcon(); verify(view, never()).showTagFilterIcon(); verify(view).showBreadcrumbNav(); verify(view).showBusinessViewIcon(); verify(view).hideTechViewIcon(); verify(view).hideTagFilterIcon(); }