assertThat(script, isA(expectedScriptClass));
}
@Test
public void testCompileScriptToDirWithMethodOnlyScript() throws Exception {
final ScriptSource scriptSource = scriptSource("def method() { println 'hi' }");
scriptCompilationHandler.compileToDir(scriptSource, classLoader, scriptCacheDir, null, expectedScriptClass, verifier);
checkScriptClassesInCache();
Script script = scriptCompilationHandler.loadFromDir(scriptSource, classLoader, scriptCacheDir,