public void testDeleteReportReviewComment() { Report report = Fixtures.createReport("testReport"); ArrayList<ReportReviewComment> commentsList = new ArrayList<ReportReviewComment>(); commentsList.add(Fixtures.createReportReviewComment(1, "comment 1")); commentsList.add(Fixtures.createReportReviewComment(2, "comment 2")); commentsList.add(Fixtures.createReportReviewComment(3, "comment 3")); report.setReviewComments(commentsList); EasyMock.expect(reportDao.getById(10)).andReturn(report); reportDao.save(report); replayMocks(); impl.deleteReportReviewComment(10, 2); verifyMocks(); assertEquals( "Comment not deleted from comments list", 2, report.getReviewCommentsInternal().size()); }