public void testAddDependenciesInRuntime() throws Exception
{
JcrGroovyClassLoaderProvider classLoaderProvider = new JcrGroovyClassLoaderProvider();
JcrGroovyCompiler compiler = new JcrGroovyCompiler(classLoaderProvider);
SourceFolder[] src =
new SourceFolder[]{new SourceFolder(new UnifiedNodeReference("db1", "ws", groovyRepo.getPath()).getURL())};
Class<?>[] classes = compiler.compile(src, new UnifiedNodeReference("db1", "ws", scriptB));
assertEquals(1, classes.length);
GroovyObject go = (GroovyObject)classes[0].newInstance();
assertEquals("groovy compiler test", go.invokeMethod("getMessage", new Object[0]));
}