@Test
    void verifyAction() throws Throwable {
        val jwksKeystore = new ClassPathResource("sample.jwks");
        val data = IOUtils.toString(jwksKeystore.getInputStream(), StandardCharsets.UTF_8);
        val keystoreFile = getKeystoreFile();
        try (val webServer = new MockWebServer(data);
             val cipher = new JsonWebKeySetStringCipherExecutor(keystoreFile, "http://localhost:" + webServer.getPort())) {
            webServer.start();
            val token = cipher.encode("Misagh");
            assertEquals("Misagh", cipher.decode(token));
            Files.setLastModifiedTime(keystoreFile.toPath(), FileTime.from(Instant.now()));
            Thread.sleep(5_000);
            cipher.destroy();
        }
    }
This is {@link JsonWebKeySetStringCipherExecutorTests}.

@author Misagh Moayyed
@since 5.3.0
core/cas-server-core-util/src/test/java/org/apereo/cas/util/cipher/JsonWebKeySetStringCipherExecutorTests.java