### Question:
TransactionalSectionService extends AbstractTransactionalEntityService<Section, SectionDao> implements SectionService { public void prepareSectionsForView(List<Section> sections) { for (Section section : sections) { List<Branch> branches = section.getBranches(); branchService.fillStatisticInfo(branches); } } TransactionalSectionService(SectionDao dao, BranchService branchService, UserService userService,
                                       TopicDao topicDao, PostDao postDao); @Override List<Section> getAll(); @Override List<Section> getAllAvailableSections(long currentTopicId); void prepareSectionsForView(List<Section> sections); @Override Section deleteAllTopicsInSection(long sectionId); @Override void deleteAllTopicsInForum(); @Override void ifSectionIsVisible(Section section); @Override List<Post> getLastPostsForSection(Section section, int postsCount);  }### Answer:
@Test public void testPrepareSectionsForView() { List<Section> sections = Arrays.asList(new Section(SECTION_NAME), new Section(SECTION_NAME)); int sectionSize = sections.size(); sectionService.prepareSectionsForView(sections); verify(branchService, Mockito.times(sectionSize)) .fillStatisticInfo(Mockito.anyListOf(Branch.class)); }