MockSyncInterceptor sourceInterceptor = new MockSyncInterceptor();
source.addRequestHandler(sourceRequestHandler);
source.addResponseHandler(sourceResponseHandler);
source.addInterceptor(sourceInterceptor);
SourceWireFactory sourceFactory = new JDKWireFactoryFactory().createSourceWireFactory();
Map<Method, SourceInvocationConfiguration> sourceInvocationConfigs = new MethodHashMap<SourceInvocationConfiguration>();
sourceInvocationConfigs.put(hello, source);
WireSourceConfiguration sourceConfig = new WireSourceConfiguration("foo",new QualifiedName("target/SimpleTarget"),
sourceInvocationConfigs, Thread.currentThread().getContextClassLoader(), msgFactory);
sourceFactory.setConfiguration(sourceConfig);
sourceFactory.setBusinessInterface(SimpleTarget.class);
TargetInvocationConfiguration target = new TargetInvocationConfiguration(hello);
MockSyncInterceptor targetInterceptor = new MockSyncInterceptor();
target.addInterceptor(targetInterceptor);
target.addInterceptor(new InvokerInterceptor());