Map<String, String> namespaceMap = new HashMap<String, String>();
namespaceMap.put("http://tags", "ns1");
Map<String, String> map = new HashMap<String, String>();
map.put("tagVO", "{http://tags}thetag");
provider.setOutTransformElements(map);
TagVO tag = new TagVO("A", "B");
ByteArrayOutputStream bos = new ByteArrayOutputStream();
provider.writeTo(tag, TagVO.class, TagVO.class,
new Annotation[0], MediaType.TEXT_XML_TYPE, new MetadataMap<String, Object>(), bos);
String expected = "{\"ps1.thetag\":{\"group\":\"B\",\"name\":\"A\"}}";
assertEquals(expected, bos.toString());