public void testInvocation() throws Exception {
AbstractApplicationContext ctx = createSpringContext();
SpringCompositeComponent parent = new SpringCompositeComponent("spring", ctx, null, null, null);
parent.start();
TestBean referenceTarget = new TestBeanImpl();
Reference reference = createMock(Reference.class);
expect(reference.getName()).andReturn("bar").anyTimes();
expect(reference.isSystem()).andReturn(false).atLeastOnce();
expect(reference.getInterface()).andStubReturn(TestBean.class);
expect(reference.getServiceInstance()).andStubReturn(referenceTarget);