### Question:
AddProjectButtonPresenter { @PostConstruct public void init() { view.init(this); setupOtherProjects(); } @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 initTest() { NewWorkspaceProjectHandler otherNewWorkspaceProjectHandler1 = mock(NewWorkspaceProjectHandler.class); doReturn(true).when(otherNewWorkspaceProjectHandler1).canCreate(); NewWorkspaceProjectHandler otherNewWorkspaceProjectHandler2 = mock(NewWorkspaceProjectHandler.class); doReturn(false).when(otherNewWorkspaceProjectHandler2).canCreate(); List<NewResourceHandler> handlers = new ArrayList<>(); handlers.add(otherNewWorkspaceProjectHandler1); handlers.add(otherNewWorkspaceProjectHandler2); doReturn(handlers).when(presenter).getNewProjectHandlers(); presenter.init(); verify(view, never()).hideOtherProjects(); verify(presenter).addNewProjectHandler(otherNewWorkspaceProjectHandler1); verify(view).addOtherProject(any()); }