private PicoContainer buildApplicationContainer(String script, Class containerBuilderClass) throws ClassNotFoundException {
Mock servletContextMock = mock(ServletContext.class);
ServletContext context = (ServletContext)servletContextMock.proxy();
ContainerBuilder containerBuilder = createContainerBuilder(script, containerBuilderClass);
ObjectReference containerRef = new SimpleReference();
containerBuilder.buildContainer(containerRef, new SimpleReference(), context, false);
return (PicoContainer) containerRef.get();
}