CountDownLatch startSignal = new CountDownLatch(1);
CountDownLatch doneSignal = new CountDownLatch(1);
MockStaticInvoker invoker = new MockStaticInvoker(hello, new SimpleTargetImpl(startSignal, doneSignal));
source.setTargetInvoker(invoker);
Message msg = factory.createMessage();
msg.setBody("foo");
msg.setTargetInvoker(invoker);
Message response = source.getHeadInterceptor().invoke(msg);
startSignal.countDown();
doneSignal.await();
Assert.assertEquals(null, response.getBody());
Assert.assertEquals(1, sourceRequestHandler.getCount());
//FIXME why isn't the responseHandler invoked?
//Assert.assertEquals(1, sourceResponseHandler.getCount());
Assert.assertEquals(1, sourceInterceptor.getCount());
Assert.assertEquals(1, targetRequestHandler.getCount());