Deployment deployment = new Deployment(syConfigStream);
syConfigStream.close();
// initialize the deployment
ServiceDomain domain = new ServiceDomainManager().createDomain();
domain.setProperty(CamelContextConfigurator.SHUTDOWN_TIMEOUT, "10");
deployment.init(domain, ActivatorLoader.createActivators(domain));
deployment.start();
// we want to invoke a mock so we can check for messages received
final ServiceReference reference = domain.getServiceReference(svcName);
domain.getServices(svcName).get(0).unregister();
final MockHandler service = new MockHandler();
domain.registerService(svcName, new InOnlyService(), service);
final int NUM_SENDS = 5;
for (int i = 0; i < NUM_SENDS; i++) {
new Thread(new Runnable() {