@Test
    void verifyEmptyFile() throws Throwable {
        val gen = mock(OidcJsonWebKeystoreGeneratorService.class);
        when(gen.generate()).thenReturn(ResourceUtils.EMPTY_RESOURCE);
        val loader = new OidcDefaultJsonWebKeystoreCacheLoader(gen);
        assertNull(loader.load(new OidcJsonWebKeyCacheKey("https://cas.example.org", OidcJsonWebKeyUsage.SIGNING)));

        val file = File.createTempFile("keys", ".json");
        FileUtils.writeStringToFile(file, new JsonWebKeySet(List.of()).toJson(), StandardCharsets.UTF_8);
        when(gen.generate()).thenReturn(new FileSystemResource(file));
        assertNull(loader.load(new OidcJsonWebKeyCacheKey("https://cas.example.org", OidcJsonWebKeyUsage.SIGNING)));
    }
This is {@link OidcDefaultJsonWebKeystoreCacheLoaderTests}.

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