JDKOutboundInvocationHandler handler = new JDKOutboundInvocationHandler(wire, new WorkContextImpl());
assertEquals("foo", handler.invoke(hello, new Object[]{"foo"}));
}
private OutboundInvocationChain createChain(Operation operation) {
OutboundInvocationChain source = new OutboundInvocationChainImpl(operation);
MockSyncInterceptor sourceInterceptor = new MockSyncInterceptor();
source.addInterceptor(sourceInterceptor);
InboundInvocationChain target = new InboundInvocationChainImpl(operation);
MockSyncInterceptor targetInterceptor = new MockSyncInterceptor();
target.addInterceptor(targetInterceptor);
target.addInterceptor(new InvokerInterceptor());
// connect the source to the target
source.setTargetInterceptor(targetInterceptor);
source.prepare();
target.prepare();
Method method = JavaIDLUtils.findMethod(operation, SimpleTarget.class.getMethods());
MockStaticInvoker invoker = new MockStaticInvoker(method, new SimpleTargetImpl());
source.setTargetInvoker(invoker);
return source;
}