handler.setWaitTimeout(3000);
Exchange ex = attachments.createExchange(handler);
ex.send(ex.createMessage()
.setContent(TEST_IN_CONTENT)
.addAttachment(TEST_IN_ATTACHMENT, new DummyDataSource(TEST_IN_ATTACHMENT)));
Assert.assertEquals(1, handler.waitForOKMessage().getMessages().size());
Message reply = handler.getMessages().poll().getMessage();
DataSource attachOut = reply.getAttachment(TEST_OUT_ATTACHMENT);
Assert.assertNotNull(attachOut);
Assert.assertEquals(TEST_OUT_ATTACHMENT, attachOut.getName());
}