@Test
@SuppressWarnings("AssertEqualsBetweenInconvertibleTypes")
public void testDeserializeToMap() throws Exception
{

  Map<String, Type> fieldToType = Maps.newHashMap();
  fieldToType.put("name", Type.STRING);
  fieldToType.put("longvals", Type.LONG);
  fieldToType.put("stringvals", Type.STRING);
  FieldsDescriptor fd = new FieldsDescriptor(fieldToType);
  String json = SchemaUtils.jarResourceFileToString("deserializeToMapTest.json");
  Map<String, Set<Object>> resultMap = GPOUtils.deserializeToMap(fd, new JSONObject(json));
  Set<Object> names = resultMap.get("name");
  Set<Object> longvals = resultMap.get("longvals");
  Set<Object> stringvals = resultMap.get("stringvals");
  Assert.assertEquals(Sets.newHashSet("tim"), names);
  Assert.assertEquals(Sets.newHashSet(1L, 2L, 3L), longvals);
  Assert.assertEquals(Sets.newHashSet("a", "b", "c"), stringvals);
}