@Test
public void testWriteSampleRootElement() throws Exception {

	JsonXMLObjectProvider provider = new JsonXMLObjectProvider(null);
	Annotation[] annotations = new Annotation[0];
	
	SampleRootElement sampleRootElement = new SampleRootElement();
	sampleRootElement.attribute = "hello";
	sampleRootElement.elements = Arrays.asList("world");	
	StringWriter writer = new StringWriter();
	provider.write(SampleRootElement.class,
			null, annotations, MediaType.APPLICATION_JSON_TYPE, null, writer, sampleRootElement);
	String json = "{\"sampleRootElement\":{\"@attribute\":\"hello\",\"elements\":[\"world\"]}}";
	Assert.assertEquals(json, writer.toString());
}