JsonHelper { public static String json(Object object) { try { return MAPPER.writeValueAsString(object); } catch (Exception e) { throw new RuntimeException(e); } }  static T obj(String json, Class<T> klazz); static T object(String json, Class<T> klazz); static Update<T> update(String json, Class<T> klazz); static String json(Object object); static ObjectMapper MAPPER; }
@Test public void testJson() throws Exception { TestModel model = TestModel.builder().name("Marty").birthday(LocalDate.of(1985, 10, 26)).build(); assertEquals("{\"name\":\"Marty\",\"birthday\":\"1985-10-26\"}", JsonHelper.json(model)); }