@Test
        void verifyClientCredentialsWithFormPost() throws Throwable {
            val registeredService = getOidcRegisteredService(UUID.randomUUID().toString());
            registeredService.setEncryptIdToken(false);
            registeredService.setJwtAccessToken(true);
            registeredService.setSupportedGrantTypes(Set.of(OAuth20GrantTypes.CLIENT_CREDENTIALS.getType()));
            registeredService.setTokenEndpointAuthenticationMethod(OAuth20ClientAuthenticationMethods.CLIENT_SECRET_POST.getType());
            servicesManager.save(registeredService);
            mvc.perform(post("/cas/" + OidcConstants.BASE_OIDC_URL + '/' + OidcConstants.TOKEN_URL)
                    .secure(true)
                    .param(OAuth20Constants.CLIENT_ID, registeredService.getClientId())
                    .param(OAuth20Constants.CLIENT_SECRET, registeredService.getClientSecret())
                    .queryParam(OAuth20Constants.GRANT_TYPE, OAuth20GrantTypes.CLIENT_CREDENTIALS.name()))
                .andExpect(status().isOk())
                .andExpect(jsonPath("$.access_token").exists())
                .andReturn();
        }
This is {@link OidcAccessTokenEndpointControllerTests}.

@author Misagh Moayyed
@since 6.3.0
support/cas-server-support-oidc/src/test/java/org/apereo/cas/oidc/web/controllers/token/OidcAccessTokenEndpointControllerTests.java