CompositeComponent grandParent = new CompositeComponentImpl("grandparent", null, null, null);
CompositeComponent parent = new CompositeComponentImpl("parent", grandParent, null, null);
// create a context in the grandparent that the reference will be autowired to
ComponentDefinition<SystemImplementation> targetComponentDefinition = MockComponentFactory.createTarget();
AtomicComponent targetComponentComponent = builder.build(parent, targetComponentDefinition, deploymentContext);
grandParent.register(targetComponentComponent);
BoundReferenceDefinition<SystemBinding> targetReferenceDefinition = MockComponentFactory.createBoundReference();
ComponentDefinition<SystemImplementation> sourceComponentDefinition =
MockComponentFactory.createSourceWithTargetReference();