@Test
public void testValidJson()
{

    User user = new User("Joe", 25);
    String json = codec.toJson(user);
    User response = handler.handle(null, mockResponse().contentType(JSON_UTF_8).body(json).build());
    assertEquals(response.getName(), user.getName());
    assertEquals(response.getAge(), user.getAge());
}