replay(scheduler);
WorkContext context = createMock(WorkContext.class);
Method method = AsyncTarget.class.getMethod("invoke");
method.setAccessible(true);
InboundWire inboundWire = createMock(InboundWire.class);
AsyncJavaTargetInvoker invoker =
new AsyncJavaTargetInvoker(method, inboundWire, component, null, context);
InboundWire wire = createServiceWire("foo", AsyncTarget.class, null);
Map<Operation<?>, InboundInvocationChain> chains = wire.getInvocationChains();
InboundInvocationChain chain = chains.get(wire.getServiceContract().getOperations().get("invoke"));
chain.setTargetInvoker(invoker);
chain.prepare();