ServiceReference referenceA = _domain.registerServiceReference(SERVICE_A, new InOnlyService());
_domain.registerServiceReference(SERVICE_B, new InOnlyService());
Service serviceA = _domain.registerService(SERVICE_A, new InOnlyService(), new MockHandler());
_domain.registerService(SERVICE_B, new InOnlyService(), _provider);
MockExchange ex = new MockExchange();
Message msg = ex.createMessage().setContent("TEST");
ex.setMessage(msg);
ex.consumer(referenceA, new InOnlyOperation(null));
ex.provider(serviceA, new InOnlyOperation(null));
invoker.handleMessage(ex);
Assert.assertTrue(_provider.getMessages().size() == 1);
Assert.assertEquals(msg.getContent(), _provider.getMessages().poll().getMessage().getContent());
}