### Question:
RoleManagerServiceImpl extends HibernateDaoImpl implements RoleManagerService { @Transactional(propagation = Propagation.REQUIRED, readOnly = false) public void updateRole(ExecutionContext context, String roleName, Role roleDetails, Set<User> assignedUserSet, Set<User> unassignedUserSet) { userService.assignUsers(context, roleName, toNameSet(assignedUserSet)); userService.unassignUsers(context, roleName, toNameSet(unassignedUserSet)); userService.updateRole(null, roleName, roleDetails); }  void setTransactionManager(AbstractPlatformTransactionManager transactionManager); void setUserService(UserAuthorityService userService); PaginatedOperationResult getUsersWithoutRole(final ExecutionContext context, final String roleName, final String userName,
                                    Set assignedUserNameSet, Set unassignedUserNameSet,
                                    int firstResult, int maxResults); PaginatedOperationResult getUsersWithRole(final ExecutionContext context, final String roleName, final String userName,
                                 Set assignedUserNameSet, Set unassignedUserNameSet,
                                 int firstResult, int maxResults); @Transactional(propagation = Propagation.REQUIRED, readOnly = false) void updateRole(ExecutionContext context, String roleName, Role roleDetails, Set<User> assignedUserSet,
            Set<User> unassignedUserSet); @Transactional(propagation = Propagation.REQUIRED, readOnly = false) void deleteAll(ExecutionContext context, List<String> roles);  }### Answer:
@Test public void updateRole() { Set assignedUserNameSet = new HashSet(); Set unassignedUserNameSet = new HashSet(); assignedUserNameSet.add(bob); assignedUserNameSet.add(steve); unassignedUserNameSet.add(bill); unassignedUserNameSet.add(jon); Set<User> assignedUserSet = new HashSet<User>(); Set<User> unassignedUserSet = new HashSet<User>(); assignedUserSet.add(bobUser); assignedUserSet.add(steveUser); unassignedUserSet.add(billUser); unassignedUserSet.add(jonUser); managerService.updateRole(null, demo, demoRole, assignedUserSet, unassignedUserSet); verify(userService, times(1)).assignUsers(null, demo, assignedUserNameSet); verify(userService, times(1)).unassignUsers(null, demo, unassignedUserNameSet); verify(userService , times(1)).updateRole(null, demo, demoRole); }