@Test
public void testJsonReadException()
        throws IOException
{

    InputStream inputStream = mock(InputStream.class);
    IOException expectedException = new IOException("test exception");
    when(inputStream.read()).thenThrow(expectedException);
    when(inputStream.read(any(byte[].class))).thenThrow(expectedException);
    when(inputStream.read(any(byte[].class), anyInt(), anyInt())).thenThrow(expectedException);
    User response = handler.handle(null, mockResponse()
            .contentType(JSON_UTF_8)
            .body(inputStream)
            .build());
    assertSame(response, DEFAULT_VALUE);
}