### Question:
TransactionalGroupService extends AbstractTransactionalEntityService<Group, GroupDao> implements GroupService { @Override public List<GroupAdministrationDto> getGroupNamesWithCountOfUsers() { List<GroupAdministrationDto> groupNamesWithCountOfUsers = dao.getGroupNamesWithCountOfUsers(); setEditableFlag(groupNamesWithCountOfUsers); return groupNamesWithCountOfUsers; } TransactionalGroupService(GroupDao groupDao,
                                     AclManager manager,
                                     UserDao userDao,
                                     SecurityService securityService); @Override List<Group> getAll(); @Override SecurityGroupList getSecurityGroups(); @Override List<Group> getByNameContains(String name); @Override List<Group> getByName(String name); @Override Page<UserDto> getPagedGroupUsers(long id, PageRequest pageRequest); @Override void deleteGroup(Group group); @Override void saveGroup(Group group); @Override void saveOrUpdate(GroupAdministrationDto dto); @Override List<GroupAdministrationDto> getGroupNamesWithCountOfUsers();  }### Answer:
@Test public void predefinedGroupMarkedAsNotEditable() throws Exception { when(groupDao.getGroupNamesWithCountOfUsers()).thenReturn(singletonList(new GroupAdministrationDto(sample(PREDEFINED_GROUP_NAMES), 1))); List<GroupAdministrationDto> groupNamesWithCountOfUsers = groupService.getGroupNamesWithCountOfUsers(); GroupAdministrationDto groupDto = getOnlyElement(groupNamesWithCountOfUsers); assertFalse(groupDto.isEditable()); }