CommentListService implements Serializable { public List<Comment> getResultList() { log.info("get result list"); return commentDao.findComments(blogEntryService.getInstance()); }  List<Comment> getResultList();  }
@Test public void testGetResultList() throws Exception { BlogEntry blogEntry = new BlogEntryTestdataBuilder().build(); EasyMock.expect(blogEntryService.getInstance()).andReturn(blogEntry); EasyMock.expect(commentDao.findComments(blogEntry)).andReturn(Arrays.asList(new CommentTestdataBuilder().build())); mockProvider.replayAll(); List<Comment> resultList = commentListService.getResultList(); Assert.assertEquals(1, resultList.size()); mockProvider.verifyAll(); }