@Test
    void verifyAction() throws Throwable {
        val auth = getAuthenticator();

        val request = new MockHttpServletRequest();
        val response = new MockHttpServletResponse();
        val context = new JEEContext(request, response);

        val registeredService = getOidcRegisteredService();
        registeredService.setClientId(UUID.randomUUID().toString());

        val file = File.createTempFile("jwks-service", ".jwks");
        val core = casProperties.getAuthn().getOidc().getJwks().getCore();
        val jsonWebKey = OidcJsonWebKeyStoreUtils.generateJsonWebKey(
            core.getJwksType(), core.getJwksKeySize(), OidcJsonWebKeyUsage.SIGNING);
        jsonWebKey.setKeyId("cas-kid");

        val jsonWebKeySet = new JsonWebKeySet(jsonWebKey);
        val data = jsonWebKeySet.toJson(JsonWebKey.OutputControlLevel.INCLUDE_PRIVATE);
        FileUtils.write(file, data, StandardCharsets.UTF_8);
        registeredService.setJwks("file://" + file.getAbsolutePath());
        servicesManager.save(registeredService);

        val claims = getClaims(registeredService.getClientId(),
            oidcIssuerService.determineIssuer(Optional.of(registeredService)),
            registeredService.getClientId(), registeredService.getClientId());
        val webKeys = oidcServiceJsonWebKeystoreCache.get(
            new OidcJsonWebKeyCacheKey(registeredService, OidcJsonWebKeyUsage.SIGNING)).get();
        val key = (PublicJsonWebKey) webKeys.getJsonWebKeys().getFirst();
        val jwt = EncodingUtils.signJwsRSASha512(key.getPrivateKey(),
            claims.toJson().getBytes(StandardCharsets.UTF_8), Map.of());
        val credentials = getCredential(request, OAuth20Constants.CLIENT_ASSERTION_TYPE_JWT_BEARER,
            new String(jwt, StandardCharsets.UTF_8), registeredService.getClientId());

        auth.validate(new CallContext(context, new JEESessionStore()), credentials);
        assertNotNull(credentials.getUserProfile());
    }
This is {@link OidcJwtAuthenticatorRsaTests}.

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