### Question:
UserService { public UserDto getUserPermission(String id) { UserDto userDto = userDao.findById(id) .map(userMapper::toDto) .orElseThrow(ResourceNotFoundException::new); List<RoleDto> roles = roleDao.findRolesOfUser(id).map(roleMapper::toDto).orElse(Collections.emptyList()); roles.forEach( e -> { Set<ResourceDto> resources = Optional.ofNullable( resourceDao.findResourceByRoleIds(Collections.singletonList(e.getId()))) .map(resourceMapper::toDto) .orElse(Collections.emptySet()); e.setResources(resources); } ); userDto.setRoles(new HashSet<>(roles)); return userDto; } UserService(UserDao userDao,
	                   UserMapper userMapper,
	                   BCryptPasswordEncoder bCryptPasswordEncoder,
	                   LoginLogServiceRpc loginLogServiceRpc,
	                   RoleDao roleDao,
	                   ResourceDao resourceDao,
	                   UserRoleDao userRoleDao,
	                   RoleMapper roleMapper,
	                   ResourceDao resourceDao1,
	                   ResourceMapper resourceMapper, JPAQueryFactory jpaQueryFactory); void registerUser(UserDto userDto); Page<UserDto> findByCondition(UserDto userDto, Pageable pageable); void deleteByIds(List<String> userIds); void updateByPrimaryKey(UserDto userDto); void changePassword(String userId, String oldPassword, String newOnePass); UserDto getUserPermission(String id); List<UserDto> findUsersOfRole(RoleDto roleDto); UserDto findById(String userId); UserDto findByCondition(UserDto userDto); void updateUserProfile(UserDto userDto);  }### Answer:
@Test public void getUserPermission() { UserDto userPermission = userService.getUserPermission("1353259235236756534"); Assert.assertNotNull(userPermission); }