Reader script = new StringReader("" +
"builder = new org.nanocontainer.script.groovy.GroovyNodeBuilder()\n" +
"pico = builder.container(parent:parent) { \n" +
" component(StringBuffer)\n" +
"}");
PicoContainer parent = new DefaultPicoContainer();
PicoContainer pico = buildContainer(new GroovyContainerBuilder(script, getClass().getClassLoader()), parent, "SOME_SCOPE");
//PicoContainer.getParent() is now ImmutablePicoContainer
assertNotSame(parent, pico.getParent());
assertEquals(StringBuffer.class, pico.getComponentInstance(StringBuffer.class).getClass());
}