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