Target target = new TargetImpl();
SystemOutboundWire outboundWire = EasyMock.createMock(SystemOutboundWire.class);
EasyMock.expect(outboundWire.getTargetService()).andReturn(target);
EasyMock.replay(outboundWire);
SystemInboundWire wire = new SystemInboundWireImpl("Target", Target.class);
SystemService serviceContext = new SystemServiceImpl("service", null);
serviceContext.setInboundWire(wire);
serviceContext.setOutboundWire(outboundWire);
wire.setTargetWire(outboundWire);
assertSame(target, serviceContext.getServiceInstance());
EasyMock.verify(outboundWire);
}