CaseCommentsPresenter extends AbstractCaseInstancePresenter<CaseCommentsPresenter.CaseCommentsView> { @Override protected void loadCaseInstance(final CaseInstanceSummary cis) { refreshComments(); }  int getPageSize(); void setCurrentPage(int i); int getCurrentPage(); @WorkbenchPartTitle String getTittle(); void refreshComments(); void loadMoreCaseComments(); void sortComments(final boolean sortAsc); static final String SCREEN_ID; static final int PAGE_SIZE; }
@Test public void testLoadCaseInstance() { final CaseInstanceSummary cis = newCaseInstanceSummary(); final CaseCommentSummary caseComment = CaseCommentSummary.builder().id(commentId).author(author).text(text).addedAt(addedAt).build(); when(caseManagementService.getComments(cis.getContainerId(), cis.getCaseId(), 0, presenter.getPageSize())).thenReturn(Collections.singletonList(caseComment)); when(identity.getIdentifier()).thenReturn(author); setupCaseInstance(cis); verify(caseCommentsView).setCaseCommentList(Collections.singletonList(caseComment)); verifyClearCaseInstance(1); }