MockHandler sourceRequestHandler = new MockHandler();
MockSyncInterceptor sourceInterceptor = new MockSyncInterceptor();
source.addRequestHandler(sourceRequestHandler);
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);