private Object checkXpath(MockEndpoint mock, String xpathString, final Map<String, String> prefix2Namespace)
throws XPathExpressionException, SAXException, IOException, ParserConfigurationException {
Message mess = getMessage(mock);
InputStream body = mess.getBody(InputStream.class);
assertNotNull(body);
XPathFactory xpathFactory = XPathFactory.newInstance();
XPath xpath = xpathFactory.newXPath();
NamespaceContext nc = new NamespaceContext() {
@SuppressWarnings("rawtypes")
@Override
public Iterator getPrefixes(String namespaceURI) {