### Question:
UserService { public void updateByPrimaryKey(UserDto userDto) { List<UserRole> userRoles = userDto.getRoles().stream() .map(user -> new UserRole(userDto.getId(), user.getId())) .collect(Collectors.toList()); userDao.save(userMapper.toEntity(userDto)); userRoleDao.deleteByUserIdIn(Collections.singletonList(userDto.getId())); userRoleDao.saveAll(userRoles); } 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 updateByPrimaryKey() { UserDto user = new UserDto(); user.setId("1135559244600856578"); user.setNickName("测试"); userService.updateByPrimaryKey(user); }