@Before public void setUp() { service = new ChampionshipService(); service.setPlayerDao(playerDao); service.setTrophyDao(trophyDao); trophy = new Trophy(); }
@Test public void testChampionService() { EasyMock.expect(trophyDao.findByChampionshipsName("spi")).andReturn(trophy); EasyMock.expect(playerDao.getPlayersHavingTrophy(trophy)).andReturn(null); EasyMockUnitils.replay(); service.winnersInChampionship("spi"); EasyMock.verify(trophyDao); EasyMock.verify(playerDao); }