mappedReference.setServiceContract(contract);
type.add(mappedReference);
ComponentDefinition<SystemImplementation> definition = new ComponentDefinition<SystemImplementation>(impl);
CompositeComponent parent = EasyMock.createNiceMock(CompositeComponent.class);
FooImpl targetFoo = new FooImpl();
EasyMock.expect(parent.resolveSystemInstance(EasyMock.eq(Foo.class))).andReturn(targetFoo);
EasyMock.replay(parent);
AtomicComponent component = builder.build(parent, definition, deploymentContext);
component.start();
container.onEvent(new CompositeStart(this, null));
FooImpl2 foo = (FooImpl2) component.getServiceInstance();