assertXMLEqual("Invalid request", "<request/>", writer.toString());
return new StreamSource(new StringReader("<response/>"));
}
};
endpoint.invoke(request.getPayloadSource());
MessageContext messageContext = new DefaultMessageContext(request, new MockWebServiceMessageFactory());
adapter.invoke(messageContext, endpoint);
MockWebServiceMessage response = (MockWebServiceMessage) messageContext.getResponse();
Assert.assertNotNull("No response created", response);
assertXMLEqual("Invalid payload", "<response/>", response.getPayloadAsString());
}