Source request = new StringSource("<request xmlns='http://example.com'/>");
Source response = new StringSource("<response xmlns='http://example.com'/>");
server.expect(payload(request)).andRespond(withPayload(response));
StringResult result = new StringResult();
template.sendSourceAndReceiveToResult(request, result);
assertXMLEqual(result.toString(), response.toString());
}