CaseCommentsPresenter extends AbstractCaseInstancePresenter<CaseCommentsPresenter.CaseCommentsView> { protected void addCaseComment(String caseCommentText) { caseService.call( (Void) -> { view.resetPagination(); } ).addComment(containerId, caseId, identity.getIdentifier(), caseCommentText); }  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 testAddCaseComment() { final CaseInstanceSummary cis = newCaseInstanceSummary(); when(identity.getIdentifier()).thenReturn(author); setupCaseInstance(cis); presenter.addCaseComment(text); verify(caseManagementService).addComment(eq(cis.getContainerId()), eq(cis.getCaseId()), eq(author), eq(text)); verifyClearCaseInstance(1); }