JAXBElementProvider provider = new JAXBElementProvider();
Map<String, String> map = new HashMap<String, String>();
map.put("tagVO", "thetag");
map.put("group", "group2");
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 = "<?xml version='1.0' encoding='UTF-8'?>"
+ "<thetag><group2>B</group2><name>A</name></thetag>";