}
private ScriptSource scriptSource(final String scriptText) {
final ScriptSource source = context.mock(ScriptSource.class, scriptText);
context.checking(new Expectations(){{
Resource resource = context.mock(Resource.class, scriptText + "resource");
allowing(source).getClassName();
will(returnValue(scriptClassName));
allowing(source).getFileName();
will(returnValue(scriptFileName));