@Test
public void testJsonToObject() throws Exception {

    AvroToJson avroToJson = new AvroToJson();
    User expectedUser = User.newBuilder().setAge(5).setName("Bumpkin").build();
    String jsonStr = "{\"name\":\"Bumpkin\",\"age\":5}";
    User user = avroToJson.jsonToObject(jsonStr.getBytes(StandardCharsets.UTF_8), User.class);
    assertEquals(expectedUser, user);
}