@Test
public void testWriteNullWithVirtualRoot() throws Exception {

	JsonXMLObjectProvider provider = new JsonXMLObjectProvider(null);
	Annotation[] annotations = new Annotation[]{JsonXMLVirtualSampleRootElement.class.getAnnotation(JsonXML.class)};
	StringWriter writer = new StringWriter();
	provider.write(SampleRootElement.class,
			null, annotations, MediaType.APPLICATION_JSON_TYPE, null, writer, null);
	String json = "null";
	Assert.assertEquals(json, writer.toString());
}