PayloadTemplateMessageBuilder controlMessageBuilder = new PayloadTemplateMessageBuilder();
XmlMessageValidationContext validationContext = new XmlMessageValidationContext();
validationContext.setMessageBuilder(controlMessageBuilder);
controlMessageBuilder.setPayloadData("<TestRequest><Message>Hello World!</Message></TestRequest>");
Message controlMessage = new SoapMessage("<TestRequest><Message>Hello World!</Message></TestRequest>");
reset(endpoint, consumer, endpointConfiguration, attachmentValidator);
expect(endpoint.createConsumer()).andReturn(consumer).anyTimes();
expect(endpoint.getEndpointConfiguration()).andReturn(endpointConfiguration).anyTimes();
expect(endpointConfiguration.getTimeout()).andReturn(5000L).anyTimes();