return responseMessage;
}
});
SaajSoapMessage soapRequest = EasyMock.createMock(SaajSoapMessage.class);
SoapHeader soapRequestHeader = EasyMock.createMock(SoapHeader.class);
SoapBody soapRequestBody = EasyMock.createMock(SoapBody.class);
SoapEnvelope soapRequestEnvelope = EasyMock.createMock(SoapEnvelope.class);
SOAPMessage soapRequestMessage = EasyMock.createMock(SOAPMessage.class);
MimeHeaders mimeHeaders = new MimeHeaders();
mimeHeaders.addHeader("Host", "localhost:8080");
mimeHeaders.addHeader("Content-Length", "236");
mimeHeaders.addHeader("Accept", "text/xml");
mimeHeaders.addHeader("Accept", "text/html");
mimeHeaders.addHeader("Accept", "image/gif");
mimeHeaders.addHeader("Accept", "image/jpeg");
mimeHeaders.addHeader("Content-Type", "text/xml");
Set<SoapHeaderElement> soapRequestHeaders = new HashSet<SoapHeaderElement>();
SoapHeaderElement soapRequestHeaderEntry = EasyMock.createMock(SoapHeaderElement.class);
soapRequestHeaders.add(soapRequestHeaderEntry);
org.springframework.ws.soap.SoapMessage soapResponse = EasyMock.createMock(org.springframework.ws.soap.SoapMessage.class);
StringResult soapResponsePayload = new StringResult();
reset(messageContext, soapRequestEnvelope, soapRequestHeader, soapRequestBody, soapRequestHeaderEntry, soapResponse, soapRequest, soapRequestMessage);
expect(soapRequest.getEnvelope()).andReturn(soapRequestEnvelope).times(3);
expect(soapRequest.getSoapAction()).andReturn("sayHello").anyTimes();
Set<Attachment> emptyAttachmentSet = Collections.emptySet();
expect(soapRequest.getAttachments()).andReturn(emptyAttachmentSet.iterator()).once();
expect(soapRequest.getSaajMessage()).andReturn(soapRequestMessage).once();
expect(soapRequestMessage.getMimeHeaders()).andReturn(mimeHeaders).once();
expect(messageContext.getRequest()).andReturn(soapRequest).anyTimes();
expect(soapRequestEnvelope.getBody()).andReturn(soapRequestBody).times(2);