component.getServiceUnitManager().deploy("provider", path.getAbsolutePath());
component.getServiceUnitManager().start("provider");
// Call it
DefaultServiceMixClient client = new DefaultServiceMixClient(container);
InOut inout = client.createInOutExchange();
inout.setInterfaceName(new QName("http://http.servicemix.org/Test", "ProviderInterface"));
inout.getInMessage().setContent(new StreamSource(new ByteArrayInputStream(msg.getBytes())));
long t0 = System.currentTimeMillis();
client.sendSync(inout);
long t1 = System.currentTimeMillis();
assertTrue(inout.getStatus() == ExchangeStatus.ACTIVE);
// Check we received the message
assertNotNull(inout.getOutMessage());
assertNotNull(inout.getOutMessage().getContent());
SourceTransformer sourceTransformer = new SourceTransformer();
String reply = sourceTransformer.toString(inout.getOutMessage().getContent());
String inputMesage = sourceTransformer.toString(new StreamSource(new ByteArrayInputStream(msg.getBytes())));
log.info("Msg Sent [" + inputMesage + "]");
log.info("Msg Recieved [" + reply + "]");
assertEquals(inputMesage.length(), reply.length());