public void testOutAppendElementsDiffNs() throws Exception {
JAXBElementProvider provider = new JAXBElementProvider();
Map<String, String> map = new HashMap<String, String>();
map.put("{http://tags}thetag", "{http://tagsvo2}t");
provider.setOutAppendElements(map);
TagVO2 tag = new TagVO2("A", "B");
ByteArrayOutputStream bos = new ByteArrayOutputStream();
provider.writeTo(tag, TagVO2.class, TagVO2.class,
new Annotation[0], MediaType.TEXT_XML_TYPE, new MetadataMap<String, Object>(), bos);
String expected = "<?xml version='1.0' encoding='UTF-8'?><ps1:t xmlns:ps1=\"http://tagsvo2\">"
+ "<ns2:thetag xmlns:ns2=\"http://tags\"><group>B</group><name>A</name></ns2:thetag></ps1:t>";