public void testTypedMap() throws IOException, SerializationException {
JSONSerializer typedMapSerializer =
new JSONSerializer((new TypeLiteral<HashMap<String, SampleBean2>>() {}).getType());
HashMap<String, SampleBean2> map =
(HashMap<String, SampleBean2>)typedMapSerializer.readObject(new StringReader("{foo: {a:1, b:2, c:'3'}}"));
assertTrue(JSON.get(map, "foo") instanceof SampleBean2);
assertEquals(JSON.get(map, "foo.c"), "3");
}