protected static ResourceSetPolicy createUmaPolicyRegistrationRequest(final UserProfile profile, final Collection<String> scopes) {
        val policy = new ResourceSetPolicy();
        val perm = new ResourceSetPolicyPermission();
        perm.setScopes(new HashSet<>(scopes));
        perm.setClaims(new LinkedHashMap<>(CollectionUtils.wrap("givenName", "CAS")));
        perm.setSubject(profile.getId());
        policy.setPermissions(CollectionUtils.wrapHashSet(perm));
        return policy;
    }
This is {@link BaseUmaEndpointControllerTests}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-oauth-uma/src/test/java/org/apereo/cas/uma/web/controllers/BaseUmaEndpointControllerTests.java