Map<String, Object> map =
(Map<String, Object>)mapSerializer.readObject(getClass().getResourceAsStream("map.json"));
JSONSerializer beanSerializer = new JSONSerializer(SampleBean1.class);
SampleBean1 typedMap =
(SampleBean1)beanSerializer.readObject(getClass().getResourceAsStream("map.json"));
assertEquals(typedMap.getA(), JSON.get(map, "a"));
assertEquals(typedMap.getB(), JSON.get(map, "b"));
assertEquals(typedMap.getC(), JSON.get(map, "c"));
assertEquals(typedMap.getD(), JSON.get(map, "d"));