### Question:
BranchGroupMap { public void setSelectedGroupForAllBranches(Group group) { for (ModeratingGroupComboboxRow controller : branchesCollection) { controller.setSelectedGroup(group); } } BranchGroupMap(List<PoulpeBranch> branches, List<Group> groups, BranchService branchService); void setSelectedGroupForAllBranches(Group group); List<ModeratingGroupComboboxRow> getBranchesCollection(); void setModeratingGroupForAllBranches(Group oldModeratorGroup); void setModeratingGroupForCurrentBranch(Group oldModeratorGroup, PoulpeBranch branch); List<Group> getAllAvailableGroups(); void setAllAvailableGroups(List<Group> allAvailableGroups);  }### Answer:
@Test public void setSelectedGroupForAllBranchesTest() { branchGroupMap.setSelectedGroupForAllBranches(groupToSet); for (ModeratingGroupComboboxRow item : branchesCollection) { Group selectedGroup = item.getSelectedGroup(); assertSame(groupToSet, selectedGroup); } }