namespaceMap.put("http://tags", "ns2");
provider.setNamespaceMap(namespaceMap);
Map<String, String> map = new HashMap<String, String>();
map.put("{http://tags}thetag", "{http://tagsvo2}t");
provider.setOutTransformElements(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 = "{\"ns2.t\":{\"group\":\"B\",\"name\":\"A\"}}";
assertEquals(expected, bos.toString());