public Optional<User> updateUser(final ScimRequestBuilder scimService, final User user) {
        val response = scimService
            .update(User.class, EndpointPaths.USERS, user.getId().orElseThrow())
            .setResource(user)
            .sendRequest();
        return response.isSuccess() ? Optional.of(response.getResource()) : Optional.empty();
    }
Update user.

@param scimService the scim service
@param user        the user
@return true or false
support/cas-server-support-scim-core/src/main/java/org/apereo/cas/scim/v2/BaseScimService.java