	@Test
	public void testWriteEmptyListWithVirtualRoot() throws Exception {

		JsonXMLArrayProvider provider = new JsonXMLArrayProvider(null);
		Annotation[] annotations = new Annotation[]{JsonXMLVirtualSampleRootElement.class.getAnnotation(JsonXML.class)};
		Type type = getClass().getDeclaredField("sampleRootElementList").getGenericType();
		
		List<SampleRootElement> list = new ArrayList<SampleRootElement>();

		StringWriter writer = new StringWriter();
		provider.write(List.class,
				type, annotations, MediaType.APPLICATION_JSON_TYPE, null, writer, list);

		String json = "[]";
		Assert.assertEquals(json, writer.toString());
	}