### Question:
TransactionalForumStructureService implements ForumStructureService { @Override public Jcommune deleteSectionWithBranches(PoulpeSection section) throws NoConnectionToJcommuneException,JcommuneRespondedWithErrorException,JcommuneUrlNotConfiguredException { Jcommune jcommune = (Jcommune) componentDao.getByType(ComponentType.FORUM); jCommuneNotifier.notifyAboutSectionDelete(jcommune.getUrl(), section); jcommune.removeSection(section); componentDao.saveOrUpdate(jcommune); return jcommune; } TransactionalForumStructureService(SectionDao sectionDao, BranchDao branchDao, ComponentDao componentDao,
            JCommuneNotifier jCommuneNotifier); @Override void saveJcommune(Jcommune jcommune); @Override Jcommune getJcommune(); @Override void removeBranch(PoulpeBranch branch); @Override void moveBranch(PoulpeBranch branch, PoulpeSection toSection); @Override Jcommune deleteSectionWithBranches(PoulpeSection section); @Override void deleteSectionAndMoveBranches(PoulpeSection toRemove, PoulpeSection toReceiveBranches); @Override PoulpeBranch saveBranch(PoulpeSection inSection, PoulpeBranch notYetSavedBranch); @Override void moveBranch(PoulpeBranch branch, PoulpeBranch target); @Override void moveSection(PoulpeSection section, PoulpeSection target);  }### Answer:
@Test(dataProvider = "provideJcommuneWithSectionsAndBranches") public void testDeleteSectionWithBranches(Jcommune jcommuneWithoutSpy) throws Exception { Jcommune jcommune = spy(jcommuneWithoutSpy); doReturn("").when(jcommune).getUrl(); PoulpeSection sectionToRemove = jcommune.getSections().get(0); doReturn(jcommune).when(componentDao).getByType(ComponentType.FORUM); sut.deleteSectionWithBranches(sectionToRemove); assertFalse(jcommune.getSections().contains(sectionToRemove)); verify(componentDao).saveOrUpdate(jcommune); }