### Question:
ExplorerMenu { public void onShowTagFilterSelected() { if (activeOptions.canShowTag()) { activeOptions.disableTagFiltering(); } else { activeOptions.activateTagFiltering(); } refresh(); updateCommand.execute(); } 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 testOnShowTagFilterSelectedOn() throws Exception { when(activeOptions.canShowTag()).thenReturn(false); menu.onShowTagFilterSelected(); verify(activeOptions).activateTagFiltering(); verify(updateCommand).execute(); }
@Test public void testOnShowTagFilterSelectedOff() throws Exception { when(activeOptions.canShowTag()).thenReturn(true); menu.onShowTagFilterSelected(); verify(activeOptions).disableTagFiltering(); verify(updateCommand).execute(); }