message.addOutboundAttachment(attachmentName, inboundAttachment);
}
// add an attachment, named after the componentname...
String attachmentName = context.getFlowConstruct().getName();
DataHandler dataHandler = new DataHandler(new PlainTextDataSource("text/plain", ATTACHMENT_CONTENT));
message.addOutboundAttachment(attachmentName, dataHandler);
// return the list of attachment names
FunctionalTestComponent fc = (FunctionalTestComponent) component;
fc.setReturnData(message.getOutboundAttachmentNames().toString());