Assert.assertEquals(builder.testCase().getActions().size(), 2);
Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), ReceiveMessageAction.class);
Assert.assertEquals(builder.testCase().getActions().get(1).getClass(), ReceiveMessageAction.class);
ReceiveMessageAction action = ((ReceiveMessageAction)builder.testCase().getActions().get(0));
Assert.assertEquals(action.getName(), "receive");
Assert.assertEquals(action.getEndpoint(), messageEndpoint);
Assert.assertEquals(action.getMessageType(), MessageType.XML.name());
XmlMessageValidationContext validationContext = (XmlMessageValidationContext) action.getValidationContexts().get(0);
Assert.assertTrue(validationContext.getMessageBuilder() instanceof PayloadTemplateMessageBuilder);
Assert.assertEquals(((PayloadTemplateMessageBuilder)validationContext.getMessageBuilder()).getPayloadData(), "<TestRequest><Message>Hello World!</Message></TestRequest>");
Assert.assertEquals(((PayloadTemplateMessageBuilder)validationContext.getMessageBuilder()).getHeaderData().size(), 2L);
Assert.assertEquals(((PayloadTemplateMessageBuilder)validationContext.getMessageBuilder()).getHeaderData().get(0), "<Header><Name>operation</Name><Value>foo</Value></Header>");
Assert.assertEquals(((PayloadTemplateMessageBuilder)validationContext.getMessageBuilder()).getHeaderData().get(1), "someHeaderData");
action = ((ReceiveMessageAction)builder.testCase().getActions().get(1));
Assert.assertEquals(action.getName(), "receive");
Assert.assertEquals(action.getEndpoint(), messageEndpoint);
Assert.assertEquals(action.getMessageType(), MessageType.XML.name());
validationContext = (XmlMessageValidationContext) action.getValidationContexts().get(0);
Assert.assertTrue(validationContext.getMessageBuilder() instanceof StaticMessageContentBuilder);
Assert.assertEquals(((StaticMessageContentBuilder)validationContext.getMessageBuilder()).getMessage().getPayload(), "<TestRequest><Message>Hello World!</Message></TestRequest>");
Assert.assertEquals(((StaticMessageContentBuilder)validationContext.getMessageBuilder()).getHeaderData().size(), 2L);
Assert.assertEquals(((StaticMessageContentBuilder)validationContext.getMessageBuilder()).getHeaderData().get(0), "<Header><Name>operation</Name><Value>foo</Value></Header>");