### Question:
AddProjectButtonPresenter { public void addProject() { if (userCanCreateProjects()) { final AddProjectPopUpPresenter addProjectPopUpPresenter = addProjectPopUpPresenters.get(); addProjectPopUpPresenter.show(); } } @Inject  AddProjectButtonPresenter(final View view,
                                     final ManagedInstance<AddProjectPopUpPresenter> addProjectPopUpPresenters,
                                     final ManagedInstance<MenuResourceHandlerWidget> menuResourceHandlerWidgets,
                                     final ManagedInstance<NewWorkspaceProjectHandler> newProjectHandlers,
                                     final NewResourcePresenter newResourcePresenter,
                                     final ProjectController projectController,
                                     final TranslationService translationService,
                                     final LibraryPlaces libraryPlaces); @PostConstruct void init(); void addProject(); void enableTrySamples(); void enableImportProject(); boolean userCanCreateProjects(); View getView();  }### Answer:
@Test public void addProjectWithPermissionTest() { presenter.addProject(); verify(addProjectPopUpPresenter).show(); }
@Test public void addProjectWithoutPermissionTest() { doReturn(false).when(projectController).canCreateProjects(any()); presenter.addProject(); verify(addProjectPopUpPresenter, never()).show(); }