### Question:
KieEditor extends BaseEditor<T, Metadata> implements KieEditorWrapperView.KieEditorWrapperPresenter { protected void addCommonActions(final FileMenuBuilder fileMenuBuilder) { fileMenuBuilder .addValidate(getValidateCommand()) .addNewTopLevelMenu(versionRecordManager.buildMenu()) .addNewTopLevelMenu(alertsButtonMenuItemBuilder.build()); } protected  KieEditor(); protected  KieEditor(final KieEditorView baseView); void onShowDiagramEditorDocks(@Observes PlaceGainFocusEvent event); void onHideDocks(@Observes PlaceHiddenEvent event); void showDocks(); void hideDocks(); boolean verifyEventIdentifier(AbstractPlaceEvent event); @Override void setOriginalHash(Integer originalHash); boolean mayClose(Object object); @OnClose void onClose(); void addDownloadMenuItem(final FileMenuBuilder fileMenuBuilder); @Override Validator getRenameValidator(); void setSelectedTab(int index); IsWidget getWidget(); void onRepositoryRemoved(final @Observes RepositoryRemovedEvent event); @Override boolean mayClose(Integer currentHash); @Override void onOverviewSelected(); @Override void onSourceTabSelected(); @Override void onEditTabSelected(); @Override void onEditTabUnselected(); void addTabBarWidget(final IsWidget customWidget);  }### Answer:
@Test public void testAddCommonActions() { final Command onValidate = mock(Command.class); final MenuItem buildMenu = mock(MenuItem.class); final MenuItem build = mock(MenuItem.class); doReturn(onValidate).when(presenter).getValidateCommand(); doReturn(buildMenu).when(versionRecordManager).buildMenu(); doReturn(build).when(alertsButtonMenuItemBuilder).build(); presenter.addCommonActions(fileMenuBuilder); verify(fileMenuBuilder).addValidate(onValidate); verify(fileMenuBuilder).addNewTopLevelMenu(buildMenu); verify(fileMenuBuilder).addNewTopLevelMenu(build); }