Assert.assertEquals(action.getMessageType(), MessageType.XML.name());
Assert.assertEquals(action.getEndpoint(), messageEndpoint);
Assert.assertEquals(action.getValidationContexts().size(), 1);
Assert.assertEquals(action.getValidationContexts().get(0).getClass(), XmlMessageValidationContext.class);
XmlMessageValidationContext validationContext = (XmlMessageValidationContext) action.getValidationContexts().get(0);
Assert.assertTrue(validationContext.getMessageBuilder() instanceof PayloadTemplateMessageBuilder);
Assert.assertEquals(((PayloadTemplateMessageBuilder)validationContext.getMessageBuilder()).getPayloadData(), "somePayloadData");
Assert.assertEquals(action.getAttachments().get(0).getContent(), "someAttachmentData");
Assert.assertEquals(action.getAttachments().get(0).getContentId(), testAttachment.getContentId());
Assert.assertEquals(action.getAttachments().get(0).getContentType(), testAttachment.getContentType());
Assert.assertEquals(action.getAttachments().get(0).getCharsetName(), testAttachment.getCharsetName());