JsonHelper { public static <T> T fromJson(String json, Class<T> clazz) { return GSON.fromJson(json, clazz); }  static byte[] toBytes(Object object); static String toJson(Object object); static T fromJson(String json, Class<T> clazz); static T fromJson(byte[] bytes, Class<T> clazz);  }
@Test public void fromJson() { Bean originBean = new Bean(); originBean.setA("aaaa"); originBean.setB(123); originBean.setC(new Date(1000000L)); Bean bean = JsonHelper.fromJson("{\"a\":\"aaaa\",\"b\":123,\"c\":\"Jan 1, 1970 8:16:40 AM\"}", Bean.class); Assert.assertEquals(bean, originBean); }