ComponentDefinition<SpringImplementation> componentDefinition =
new ComponentDefinition<SpringImplementation>("spring", impl);
// Create a service instance that the mock builder registry will return
WireService wireService = ArtifactFactory.createWireService();
ServiceExtension serviceContext =
new ServiceExtension("fooService", TestBean.class, null, wireService);
InboundWire inboundWire = ArtifactFactory.createInboundWire("fooService", TestBean.class);
OutboundWire outboundWire = ArtifactFactory.createOutboundWire("fooService", TestBean.class);
ArtifactFactory.terminateWire(outboundWire);
serviceContext.setInboundWire(inboundWire);
serviceContext.setOutboundWire(outboundWire);
Connector connector = ArtifactFactory.createConnector();
connector.connect(inboundWire, outboundWire, true);
// Configure the mock builder registry
BuilderRegistry registry = createMock(BuilderRegistry.class);