assertEquals(Arrays.<Object>asList(Arrays.asList("'foo'")), ctx.getProducedItems());
}
public void testContextAccessInScript() throws Exception {
Class<? extends GroovyScriptCommand> clazz = loader.parseClass("System.out.println('bar:' + bar) ; return bar;");
TestInvocationContext ctx = new TestInvocationContext();
ctx.getSession().put("bar", "bar_value");
ctx.execute2(clazz);
assertEquals(Arrays.asList("bar_value"), ctx.getProducedItems());
}