exchange.setInMessage(message);
BindingOperationInfo boi = control.createMock(BindingOperationInfo.class);
BindingMessageInfo bmi = control.createMock(BindingMessageInfo.class);
EasyMock.expect(boi.getOutput()).andReturn(bmi);
exchange.put(BindingOperationInfo.class, boi);
Channel channel = control.createMock(Channel.class);
EasyMock.expect(nmr.createChannel()).andReturn(channel);
Exchange xchg = control.createMock(Exchange.class);
EasyMock.expect(channel.createExchange(Pattern.InOut)).andReturn(xchg);
org.apache.servicemix.nmr.api.Message inMsg = control.createMock(org.apache.servicemix.nmr.api.Message.class);
EasyMock.expect(xchg.getIn()).andReturn(inMsg);
EndpointRegistry endpoints = control.createMock(EndpointRegistry.class);
EasyMock.expect(channel.getNMR()).andReturn(nmr);
EasyMock.expect(nmr.getEndpointRegistry()).andReturn(endpoints);
org.apache.servicemix.nmr.api.Message outMsg = control.createMock(org.apache.servicemix.nmr.api.Message.class);
EasyMock.expect(xchg.getOut()).andReturn(outMsg);
Source source = new StreamSource(new ByteArrayInputStream(