@Test
    void verifyEmptyCacheOperation() {
        val id = UUID.randomUUID().toString();

        val defaultCache = mock(LoadingCache.class);
        when(defaultCache.get(any())).thenReturn(null);

        val serviceCache = mock(LoadingCache.class);
        when(serviceCache.get(any())).thenReturn(Optional.empty());

        val cipher = new OidcRegisteredServiceJwtAccessTokenCipherExecutor(defaultCache,
            serviceCache, OidcIssuerService.echoing(id));

        val service = getOidcRegisteredService("whatever");
        assertTrue(cipher.getSigningKey(service).isEmpty());

        service.getProperties().put(
            RegisteredServiceProperty.RegisteredServiceProperties.ACCESS_TOKEN_AS_JWT_ENCRYPTION_ENABLED.getPropertyName(),
            new DefaultRegisteredServiceProperty("true"));
        assertTrue(cipher.getEncryptionKey(service).isEmpty());

        when(serviceCache.get(any())).thenReturn(Optional.of(new JsonWebKeySet(mock(PublicJsonWebKey.class))));
        assertTrue(cipher.getEncryptionKey(service).isEmpty());
    }
This is {@link OidcRegisteredServiceJwtAccessTokenCipherExecutorTests}.

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