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