@Test
public void testJsonErrorResponse()
{

    String json = "{\"error\": true}";
    JsonResponse<User> response = handler.handle(null, mockResponse().status(INTERNAL_SERVER_ERROR).contentType(JSON_UTF_8).body(json).build());
    assertTrue(response.hasValue());
    assertEquals(response.getJson(), json);
    assertEquals(response.getJsonBytes(), json.getBytes(StandardCharsets.UTF_8));
    assertNull(response.getValue().getName());
    assertEquals(response.getValue().getAge(), 0);
    assertEquals(response.getResponseBytes(), response.getJsonBytes());
    assertEquals(response.getResponseBody(), response.getJson());
}