builder.execute();
Assert.assertEquals(builder.testCase().getActions().size(), 1);
Assert.assertEquals(builder.testCase().getActions().get(0).getClass(), ReceiveMessageAction.class);
ReceiveMessageAction action = ((ReceiveMessageAction)builder.testCase().getActions().get(0));
Assert.assertEquals(action.getName(), "receive");
Assert.assertEquals(action.getEndpoint(), httpClient);
Assert.assertEquals(action.getValidationContexts().size(), 1L);
Assert.assertEquals(action.getValidationContexts().get(0).getClass(), XmlMessageValidationContext.class);
PayloadTemplateMessageBuilder messageBuilder = (PayloadTemplateMessageBuilder) ((XmlMessageValidationContext) action.getValidationContexts().get(0)).getMessageBuilder();
Assert.assertEquals(messageBuilder.getPayloadData(), "<TestRequest><Message>Hello World!</Message></TestRequest>");
Assert.assertEquals(messageBuilder.getMessageHeaders().size(), 4L);
Assert.assertEquals(messageBuilder.getMessageHeaders().get(HttpMessageHeaders.HTTP_REQUEST_METHOD), HttpMethod.GET.name());
Assert.assertEquals(messageBuilder.getMessageHeaders().get(HttpMessageHeaders.HTTP_CONTEXT_PATH), "foo");
Assert.assertEquals(messageBuilder.getMessageHeaders().get(HttpMessageHeaders.HTTP_REQUEST_URI), "/test");