### Question:
KieEditor extends BaseEditor<T, Metadata> implements KieEditorWrapperView.KieEditorWrapperPresenter { @Override protected Promise<Void> makeMenuBar() { if (workbenchContext.getActiveWorkspaceProject().isPresent()) { final WorkspaceProject activeProject = workbenchContext.getActiveWorkspaceProject().get(); return projectController.canUpdateProject(activeProject).then(canUpdateProject -> { if (canUpdateProject) { addSave(fileMenuBuilder); addCopy(fileMenuBuilder); addRename(fileMenuBuilder); addDelete(fileMenuBuilder); } addDownloadMenuItem(fileMenuBuilder); addCommonActions(fileMenuBuilder); return promises.resolve(); }); } return promises.resolve(); } 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 testMakeMenuBar() { doReturn(Optional.of(mock(WorkspaceProject.class))).when(workbenchContext).getActiveWorkspaceProject(); doReturn(promises.resolve(true)).when(projectController).canUpdateProject(any()); presenter.makeMenuBar(); verify(presenter).addSave(fileMenuBuilder); verify(presenter).addCopy(fileMenuBuilder); verify(presenter).addRename(fileMenuBuilder); verify(presenter).addDelete(fileMenuBuilder); verify(presenter).addDownloadMenuItem(fileMenuBuilder); verify(presenter).addCommonActions(fileMenuBuilder); }