public void testOutAppendLocalBeforeLocal() throws Exception {
JSONProvider provider = new JSONProvider();
Map<String, String> map = new HashMap<String, String>();
map.put("tagVO", "supertag");
provider.setOutAppendElements(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 = "{\"supertag\":{\"tagVO\":{\"group\":\"B\",\"name\":\"A\"}}}";
assertEquals(expected, bos.toString());