### Question:
OverviewScreenPresenter { public void setup(final ChangeRequest changeRequest, final Consumer<Boolean> finishLoadingCallback) { this.currentChangeRequestId = changeRequest.getId(); this.changeRequestAuthorId = changeRequest.getAuthorId(); this.view.setStatus(changeRequestUtils.formatStatus(changeRequest.getStatus())); this.view.setAuthor(changeRequest.getAuthorId()); this.view.setCreatedDate(changeRequestUtils.formatCreatedDate(changeRequest.getCreatedDate())); this.view.setSummary(changeRequest.getSummary()); this.view.setDescription(changeRequest.getDescription()); this.view.setSourceBranch(changeRequest.getSourceBranch()); this.view.setTargetBranch(changeRequest.getTargetBranch()); this.view.setCommentInputPlaceHolder(ts.getTranslation(LibraryConstants.LeaveAComment)); this.view.enableSummaryEditMode(false); this.view.enableDescriptionEditMode(false); this.view.showEditModes(isUserAuthor()); this.view.showRevertFailedTooltip(changeRequest.getStatus() == ChangeRequestStatus.REVERT_FAILED); this.refreshCommentList(finishLoadingCallback); } @Inject  OverviewScreenPresenter(final View view,
                                   final TranslationService ts,
                                   final ManagedInstance<CommentItemPresenter> commentItemPresenterInstances,
                                   final Caller<ChangeRequestService> changeRequestService,
                                   final LibraryPlaces libraryPlaces,
                                   final ChangeRequestUtils changeRequestUtils,
                                   final SessionInfo sessionInfo); @PostConstruct void postConstruct(); View getView(); void addComment(); void reset(); void setup(final ChangeRequest changeRequest,
                      final Consumer<Boolean> finishLoadingCallback); void checkWarnConflict(final ChangeRequest changeRequest); void startEditSummary(); void saveSummaryEdition(); void cancelSummaryEdition(); void startEditDescription(); void saveDescriptionEdition(); void cancelDescriptionEdition(); void nextCommentPage(); void prevCommentPage(); void setCommentCurrentPage(final int currentCommentPage);  }### Answer:
@Test public void setupNotAuthorTest() throws NoSuchFieldException { new FieldSetter(presenter, OverviewScreenPresenter.class.getDeclaredField("workspaceProject")).set(workspaceProject); ChangeRequest changeRequest = mock(ChangeRequest.class); doReturn("user").when(changeRequest).getAuthorId(); presenter.setup(changeRequest, b -> { }); verify(view).showEditModes(false); }
@Test public void setupIsAuthorTest() throws NoSuchFieldException { new FieldSetter(presenter, OverviewScreenPresenter.class.getDeclaredField("workspaceProject")).set(workspaceProject); ChangeRequest changeRequest = mock(ChangeRequest.class); doReturn("admin").when(changeRequest).getAuthorId(); presenter.setup(changeRequest, b -> { }); verify(view).showEditModes(true); }
@Test public void setupCommentsTest() throws NoSuchFieldException { new FieldSetter(presenter, OverviewScreenPresenter.class.getDeclaredField("workspaceProject")).set(workspaceProject); ChangeRequest changeRequest = mock(ChangeRequest.class); doReturn("user").when(changeRequest).getAuthorId(); doReturn(ChangeRequestStatus.OPEN).when(changeRequest).getStatus(); doReturn(true).when(changeRequest).isConflict(); ChangeRequestComment changeRequestComment = new ChangeRequestComment(1L, "admin", new Date(), "text"); PaginatedChangeRequestCommentList paginatedList = new PaginatedChangeRequestCommentList(Collections.nCopies(5, changeRequestComment), 0, 10, 5); doReturn(paginatedList).when(changeRequestService).getComments(anyString(), anyString(), anyLong(), anyInt(), anyInt()); presenter.setup(changeRequest, b -> { }); verify(commentItemPresenterInstances, times(5)).get(); verify(view, times(5)).addCommentItem(any()); }