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

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

        val registeredService = getOidcRegisteredService();
        servicesManager.save(registeredService);

        val claims = getClaims(registeredService.getClientId(),
            oidcIssuerService.determineIssuer(Optional.of(registeredService)),
            registeredService.getClientId(), registeredService.getClientId());
        val keyGen = KeyPairGenerator.getInstance("RSA");
        val pair = keyGen.generateKeyPair();
        val privateKey = pair.getPrivate();

        val jwt = EncodingUtils.signJwsRSASha512(privateKey, claims.toJson().getBytes(StandardCharsets.UTF_8), Map.of());
        val credentials = getCredentials(request, OAuth20Constants.CLIENT_ASSERTION_TYPE_JWT_BEARER,
            new String(jwt, StandardCharsets.UTF_8), registeredService.getClientId());
        auth.validate(new CallContext(context, new JEESessionStore()), credentials);
        assertNull(credentials.getUserProfile());
    }
This is {@link OidcJwtAuthenticatorHMacTests}.

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