activateComponent(new ReturnMockComponent("<from2/>"), "target2");
activateComponent(new ReturnMockComponent("<from3/>"), "target3");
tm.begin();
InOut me = client.createInOutExchange();
me.setService(new QName("router"));
me.getInMessage().setContent(createSource("<hello id='1' />"));
client.send(me);
tm.commit();
me = (InOut) client.receive();
assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
Node node = new SourceTransformer().toDOMNode(me.getOutMessage());
assertEquals("from1", node.getFirstChild().getNodeName());
client.done(me);
tm.begin();
me = client.createInOutExchange();
me.setService(new QName("router"));
me.getInMessage().setContent(createSource("<hello id='2' />"));
client.send(me);
tm.commit();
me = (InOut) client.receive();
assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
node = new SourceTransformer().toDOMNode(me.getOutMessage());
assertEquals("from2", node.getFirstChild().getNodeName());
client.done(me);
tm.begin();
me = client.createInOutExchange();
me.setService(new QName("router"));
me.getInMessage().setContent(createSource("<hello id='3' />"));
client.send(me);
tm.commit();
me = (InOut) client.receive();
assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
node = new SourceTransformer().toDOMNode(me.getOutMessage());
assertEquals("from3", node.getFirstChild().getNodeName());
client.done(me);
}