@Test
    void verifyWithRequestingScopes() {
        val registeredService = getOidcRegisteredService(UUID.randomUUID().toString(), randomServiceUrl());
        registeredService.setScopes(Set.of(OidcConstants.StandardScopes.OPENID.getScope(), "MyScope"));
        servicesManager.save(registeredService);
        val credentials = new UsernamePasswordCredentials(registeredService.getClientId(), registeredService.getClientSecret());
        val request = new MockHttpServletRequest();
        request.addParameter(OAuth20Constants.CLIENT_ID, registeredService.getClientId());
        request.addParameter(OAuth20Constants.CLIENT_SECRET, registeredService.getClientSecret());
        request.addParameter(OAuth20Constants.SCOPE, OidcConstants.StandardScopes.OPENID.getScope() + " MyScope");
        val ctx = new JEEContext(request, new MockHttpServletResponse());
        authenticator.validate(new CallContext(ctx, new JEESessionStore()), credentials);
        assertNotNull(credentials.getUserProfile());
        val attributes = credentials.getUserProfile().getAttributes();
        assertEquals(2, attributes.size());
        assertTrue(attributes.containsKey(OAuth20Constants.CLIENT_ID));
        assertTrue(attributes.containsKey("uid"));
    }
This is {@link OidcClientIdClientSecretAuthenticatorTests}.

@author Misagh Moayyed
@since 7.0.0
support/cas-server-support-oidc/src/test/java/org/apereo/cas/oidc/authn/OidcClientIdClientSecretAuthenticatorTests.java