### Question:
MagicServiceImpl implements MagicService { @Override public List<Spellbook> findAllSpellbooks() { return spellbookDao.findAll(); } MagicServiceImpl(WizardDao wizardDao, SpellbookDao spellbookDao, SpellDao spellDao); @Override List<Wizard> findAllWizards(); @Override List<Spellbook> findAllSpellbooks(); @Override List<Spell> findAllSpells(); @Override List<Wizard> findWizardsWithSpellbook(String name); @Override List<Wizard> findWizardsWithSpell(String name);  }### Answer:
@Test public void testFindAllSpellbooks() { final var wizardDao = mock(WizardDao.class); final var spellbookDao = mock(SpellbookDao.class); final var spellDao = mock(SpellDao.class); final var service = new MagicServiceImpl(wizardDao, spellbookDao, spellDao); verifyZeroInteractions(wizardDao, spellbookDao, spellDao); service.findAllSpellbooks(); verify(spellbookDao).findAll(); verifyNoMoreInteractions(wizardDao, spellbookDao, spellDao); }
@Test public void testFindAllSpellbooks() throws Exception { final WizardDao wizardDao = mock(WizardDao.class); final SpellbookDao spellbookDao = mock(SpellbookDao.class); final SpellDao spellDao = mock(SpellDao.class); final MagicServiceImpl service = new MagicServiceImpl(wizardDao, spellbookDao, spellDao); verifyZeroInteractions(wizardDao, spellbookDao, spellDao); service.findAllSpellbooks(); verify(spellbookDao).findAll(); verifyNoMoreInteractions(wizardDao, spellbookDao, spellDao); }