assertTrue(user1.getAuthorities().contains(authority));
}
private void removeAuthority() {
User user1 = (User) getSession().load(User.class, user1Id);
UserDto userDto1 = mapperFacade.map(user1, UserDto.class);
log.debug("\n\n old userTO = " + userDto1);
Authority authority = (Authority) getSession().load(Authority.class,
adminAuthotityId);
AuthorityDto authorityDto = mapperFacade.map(authority,
AuthorityDto.class);
assertTrue(userDto1.getAuthorities().contains(authorityDto));
userDto1.getAuthorities().remove(authorityDto);
Assert.assertNotNull(user1);
mapperFacade.map(userDto1, user1, TypeFactory.valueOf(UserDto.class),
TypeFactory.valueOf(User.class));
assertFalse(user1.getAuthorities().contains(authority));