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 StaticMessageContentBuilder);
Assert.assertEquals(((StaticMessageContentBuilder)validationContext.getMessageBuilder()).getMessage().getPayload(), "Foo");
Assert.assertNotNull(((StaticMessageContentBuilder)validationContext.getMessageBuilder()).getMessage().getHeader("operation"));
Assert.assertEquals(action.getAttachments().size(), 1L);
Assert.assertNull(action.getAttachments().get(0).getContentResourcePath());
Assert.assertEquals(action.getAttachments().get(0).getContent(), testAttachment.getContent());
Assert.assertEquals(action.getAttachments().get(0).getContentId(), testAttachment.getContentId());