@Test
    void verifyOperation() throws Throwable {
        val file = File.createTempFile("file", ".groovy");
        FileUtils.writeStringToFile(file, "println 'hello'", StandardCharsets.UTF_8);

        val scriptFactory = ExecutableCompiledScriptFactory.getExecutableCompiledScriptFactory();
        try (val resource = scriptFactory.fromResource(new FileSystemResource(file))) {
            assertDoesNotThrow(() -> resource.execute(ArrayUtils.EMPTY_OBJECT_ARRAY));
        }
        Files.setLastModifiedTime(file.toPath(), FileTime.from(Instant.now()));
        Thread.sleep(5_000);
    }
This is {@link WatchableGroovyScriptResourceTests}.

@author Misagh Moayyed
@since 6.2.0
core/cas-server-core-scripting/src/test/java/org/apereo/cas/util/WatchableGroovyScriptResourceTests.java