(List<Object>)listSerializer.readObject(getClass().getResourceAsStream("list.json"));
JSONSerializer typedListSerializer =
new JSONSerializer((new TypeLiteral<ArrayList<SampleBean2>>() {}).getType());
ArrayList<SampleBean2> typedList =
(ArrayList<SampleBean2>)typedListSerializer.readObject(getClass().getResourceAsStream("list.json"));
Object item0 = typedList.get(0);
assertTrue(item0 instanceof SampleBean2);
assertEquals(typedList.get(0).getA(), JSON.get(list, "[0].a"));
}