public void testAddReportingPeriodReviewCommentWithObject() { String comment = "mycomment"; String userId = "userId"; AdverseEventReportingPeriod rp = Fixtures.createReportingPeriod(); rp.setReviewComments(new ArrayList<ReportingPeriodReviewComment>()); impl.addReportingPeriodReviewComment(rp, comment, userId); assertEquals("Incorrect number of comments", 1, rp.getReviewComments().size()); }
public void testAddReportingPeriodReviewCommentWithId() { Integer reportingPeriodId = 5; String comment = "mycomment"; String userId = "userId"; AdverseEventReportingPeriod rp = Fixtures.createReportingPeriod(); rp.setReviewComments(new ArrayList<ReportingPeriodReviewComment>()); EasyMock.expect(rpDao.getById(reportingPeriodId)).andReturn(rp); rpDao.modifyOrSaveReviewStatusAndComments(rp); replayMocks(); impl.addReportingPeriodReviewComment(reportingPeriodId, comment, userId); verifyMocks(); }