}
@Test
public void testBranchesInSection() throws NotFoundException {
long sectionId = 1L;
Section section = new Section("section name");
section.setId(sectionId);
//set expectations
when(sectionService.get(sectionId)).thenReturn(section);
doNothing().when(sectionService).ifSectionIsVisible(section);
when(breadcrumbBuilder.getForumBreadcrumb()).thenReturn(new ArrayList<Breadcrumb>());
//invoke the object under test
ModelAndView mav = controller.branchList(sectionId);
//check expectations
verify(sectionService).get(sectionId);
//check result
assertViewName(mav, "branchList");
assertModelAttributeAvailable(mav, "section");
Section actualSection = assertAndReturnModelAttributeOfType(mav, "section", Section.class);
assertEquals(actualSection.getId(), sectionId);
}