public void eventReceived(MuleEventContext context, Object component) throws Exception
{
MuleMessage message = context.getMessage();
// add an attachment, named after the componentname...
message.addAttachment(context.getFlowConstruct().getName(), new DataHandler(
new PlainTextDataSource("text/plain", "<content>")));
// return the list of attachment names
FunctionalTestComponent fc = (FunctionalTestComponent) component;
fc.setReturnData(message.getAttachmentNames().toString());