@Test public void findAllReturnsEmptyListIfNoTrophies() { reset(trophyDAO); when(trophyDAO.retrieveAll()).thenReturn(Collections.<Trophy>emptyList()); underTest.refreshTrophies(); assertEquals(Collections.EMPTY_LIST, underTest.findAll()); }
@Before public void setUp() { trophyDAO = mock(TrophyDAO.class); when(trophyDAO.retrieveAll()).thenReturn(asList(TROPHY1, TROPHY2, TROPHY3)); underTest = new CachingTrophyRepository(trophyDAO); underTest.refreshTrophies(); }