@Test
public void testWriteSampleTypeList() throws Exception {

	JsonXMLArrayProvider provider = new JsonXMLArrayProvider(null);
	Annotation[] annotations = new Annotation[]{JsonXMLDefault.class.getAnnotation(JsonXML.class)};
	Type type = getClass().getDeclaredField("sampleTypeList").getGenericType();
	
	List<SampleType> list = new ArrayList<SampleType>();
	list.add(new SampleType());
	list.get(0).element = "hello";
	list.add(new SampleType());
	list.get(1).element = "world";
	StringWriter writer = new StringWriter();
	provider.write(List.class,
			type, annotations, MediaType.APPLICATION_JSON_TYPE, null, writer, list);
	String json = "[{\"sampleType\":{\"element\":\"hello\"}},{\"sampleType\":{\"element\":\"world\"}}]";
	Assert.assertEquals(json, writer.toString());
}