outboundChain.prepare();
EasyMock.replay(outboundChain);
Map<Operation<?>, OutboundInvocationChain> outboundChains =
new HashMap<Operation<?>, OutboundInvocationChain>();
outboundChains.put(operation, outboundChain);
OutboundWire outboundWire = EasyMock.createMock(OutboundWire.class);
EasyMock.expect(outboundWire.getServiceContract()).andReturn(contract).anyTimes();
EasyMock.expect(outboundWire.getTargetName()).andReturn(new QualifiedName("target/FooService")).anyTimes();
EasyMock.expect(outboundWire.getInvocationChains()).andReturn(outboundChains).anyTimes();
outboundWire.getTargetCallbackInvocationChains();
EasyMock.expectLastCall().andReturn(Collections.emptyMap());
Map<String, List<OutboundWire>> outboundWires = new HashMap<String, List<OutboundWire>>();
List<OutboundWire> list = new ArrayList<OutboundWire>();
list.add(outboundWire);
outboundWires.put("fooService", list);
// create the source
AtomicComponent source = EasyMock.createMock(AtomicComponent.class);
EasyMock.expect(source.isSystem()).andReturn(false).atLeastOnce();
EasyMock.expect(source.getScope()).andReturn(Scope.MODULE);
EasyMock.expect(source.getParent()).andReturn(parent).atLeastOnce();
EasyMock.expect(source.getOutboundWires()).andReturn(outboundWires);
EasyMock.expect(source.getName()).andReturn("source");
source.getInboundWires();
EasyMock.expectLastCall().andReturn(Collections.emptyMap());
EasyMock.replay(source);
EasyMock.expect(outboundWire.getContainer()).andReturn(source);
EasyMock.replay(outboundWire);
connector.connect(source);
EasyMock.verify(outboundWire);
EasyMock.verify(targetWire);