Collection<Attachment> attachments = new LinkedList<Attachment>();
DataSource source = new ByteArrayDataSource(new byte[0], "text/xml");
DataHandler handler1 = new DataHandler(source);
attachments.add(new AttachmentImpl("part1", handler1));
DataHandler handler2 = new DataHandler(source);
attachments.add(new AttachmentImpl("part2", handler2));
inMessage.setAttachments(attachments);
inMessage.putAll(message);
exchange.setInMessage(inMessage);
exchange.setOutMessage(new MessageImpl());