}
public void setUp() throws Exception {
ServiceMix smx = new ServiceMix();
smx.init();
ComponentRegistryImpl reg = new ComponentRegistryImpl();
reg.setNmr(smx);
listener = new ExchangeCompletedListener();
smx.getListenerRegistry().register(listener, new HashMap<String, Object>());
// Create components
provider = new TestComponent(new QName("provider"), "endpoint");
consumer = new TestComponent(new QName("consumer"), "endpoint");
// Register components
reg.register(new SimpleComponentWrapper(provider), ServiceHelper.createMap(ComponentRegistry.NAME, "provider"));
reg.register(new SimpleComponentWrapper(consumer), ServiceHelper.createMap(ComponentRegistry.NAME, "consumer"));
}