mappings.put("//@name", "bar");
XpathMappingDataDictionary dictionary = new XpathMappingDataDictionary();
dictionary.setMappings(mappings);
NamespaceContextBuilder namespaceContextBuilder = new NamespaceContextBuilder();
Map<String, String> namespaces = new HashMap<String, String>();
namespaces.put("foo", "http://www.foo.bar");
namespaceContextBuilder.setNamespaceMappings(namespaces);
dictionary.setNamespaceContextBuilder(namespaceContextBuilder);
Message intercepted = dictionary.interceptMessage(message, CitrusConstants.DEFAULT_MESSAGE_TYPE, context);
Assert.assertEquals(intercepted.getPayload().toString().trim(), "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns1:TestMessage xmlns:ns1=\"http://www.foo.bar\">" + System.getProperty("line.separator") +
" <ns1:Text>Hello!</ns1:Text>" + System.getProperty("line.separator") +