BaseEditor { public void enableMenuItem(final MenuItems menuItem) { setEnableMenuItem(menuItem, true); } BaseEditor(VersionRecordManager versionRecordManager,
               BaseEditorView baseView,
               BasicFileMenuBuilder menuBuilder,
               Event<ChangeTitleWidgetEvent> changeTitleNotification); protected  BaseEditor(); protected  BaseEditor(final BaseEditorView baseView); Validator getRenameValidator(); Validator getCopyValidator(); void setOriginalHash(Integer originalHash); String getTitleText(); RemoteCallback<Path> getSaveSuccessCallback(final int newHash); void onRestore(@Observes RestoreEvent restore); void reload(); void disableMenuItem(final MenuItems menuItem); void enableMenuItem(final MenuItems menuItem); void getMenus(final Consumer<Menus> menusConsumer); Command getValidateCommand(); boolean mayClose(Integer currentHash); boolean isDirty(Integer currentHash); VersionRecordManager getVersionRecordManager(); void setMetadataOriginalHash(final Integer metadataOriginalHash);  }
@Test public void testEnableMenuItem() { final Menus menus = mock(Menus.class); final MenuItem menuItem = mock(MenuItem.class); final Map<Object, MenuItem> itemMap = new HashMap<>(); itemMap.put(SAVE, menuItem); when(menus.getItemsMap()).thenReturn(itemMap); doAnswer(invocationOnMock -> { invocationOnMock.getArgumentAt(0, Consumer.class).accept(menus); return null; }).when(editor).getMenus(any()); editor.enableMenuItem(SAVE); verify(menuItem).setEnabled(true); }