@Test public void testGetResultList() throws Exception { EasyMock.expect(blogEntryDaoMock.find(5, 0)).andReturn( Arrays.asList(new BlogEntryTestdataBuilder().build())); mockProvider.replayAll(); List<BlogEntry> resultList = blogEntryListService.getResultList(); Assert.assertEquals(1, resultList.size()); mockProvider.verifyAll(); }
public List<BlogEntry> getResultList() { log.info("load blog entries"); if (resultList == null) { resultList = blogEntryDao.find(MAX_RESULTS, firstResult); } return resultList; }
BlogEntryListService { public List<BlogEntry> getResultList() { log.info("load blog entries"); if (resultList == null) { resultList = blogEntryDao.find(MAX_RESULTS, firstResult); } return resultList; } }
BlogEntryListService { public List<BlogEntry> getResultList() { log.info("load blog entries"); if (resultList == null) { resultList = blogEntryDao.find(MAX_RESULTS, firstResult); } return resultList; }  }
BlogEntryListService { public List<BlogEntry> getResultList() { log.info("load blog entries"); if (resultList == null) { resultList = blogEntryDao.find(MAX_RESULTS, firstResult); } return resultList; }  List<BlogEntry> getResultList(); int getNextFirstResult(); int getPreviousFirstResult(); Integer getFirstResult(); void setFirstResult(Integer firstResult); boolean isPreviousExists(); boolean isNextExists(); }
BlogEntryListService { public List<BlogEntry> getResultList() { log.info("load blog entries"); if (resultList == null) { resultList = blogEntryDao.find(MAX_RESULTS, firstResult); } return resultList; }  List<BlogEntry> getResultList(); int getNextFirstResult(); int getPreviousFirstResult(); Integer getFirstResult(); void setFirstResult(Integer firstResult); boolean isPreviousExists(); boolean isNextExists();  }