" component(A)\n" +
"}");
A a = new A();
Mock cafMock = mock(ComponentAdapterFactory.class);
cafMock.expects(once()).method("createComponentAdapter").with(same(A.class), same(A.class), eq(null)).will(returnValue(new InstanceComponentAdapter(A.class, a)));
ComponentAdapterFactory componentAdapterFactory = (ComponentAdapterFactory) cafMock.proxy();
PicoContainer pico = buildContainer(script, null, componentAdapterFactory);
assertSame(a, pico.getComponentInstanceOfType(A.class));
}