@Test
        void verifyOperation() {
            var jwks = oidcJsonWebKeystoreRotationService.rotate();
            assertEquals(6, jwks.getJsonWebKeys().size());

            assertEquals(2, countCurrentKeys(jwks));
            assertEquals(2, countFutureKeys(jwks));
            assertEquals(2, countPreviousKeys(jwks));

            jwks = oidcJsonWebKeystoreRotationService.rotate();
            assertEquals(8, jwks.getJsonWebKeys().size());
            assertEquals(2, countCurrentKeys(jwks));
            assertEquals(2, countFutureKeys(jwks));
            assertEquals(4, countPreviousKeys(jwks));

            jwks = oidcJsonWebKeystoreRotationService.rotate();
            assertEquals(10, jwks.getJsonWebKeys().size());
            assertEquals(2, countCurrentKeys(jwks));
            assertEquals(2, countFutureKeys(jwks));
            assertEquals(6, countPreviousKeys(jwks));

            jwks = oidcJsonWebKeystoreRotationService.revoke();
            assertEquals(4, jwks.getJsonWebKeys().size());
            assertEquals(2, countCurrentKeys(jwks));
            assertEquals(2, countFutureKeys(jwks));
            assertEquals(0, countPreviousKeys(jwks));
        }
This is {@link OidcDefaultJsonWebKeystoreRotationServiceTests}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-oidc/src/test/java/org/apereo/cas/oidc/jwks/rotation/OidcDefaultJsonWebKeystoreRotationServiceTests.java