@Test(expected = RuntimeException.class)
public void shouldHandleExceptionWhenReadingBody() throws IOException {
// given
// - an HttpResponse
HttpResponse httpResponse = new HttpResponse();
httpResponse.withStatusCode(HttpStatusCode.OK_200.code());
httpResponse.withBody("somebody");
httpResponse.withHeaders(new Header("headerName1", "headerValue1"), new Header("headerName2", "headerValue2"));
httpResponse.withCookies(new Cookie("cookieName1", "cookieValue1"), new Cookie("cookieName2", "cookieValue2"));
// - an HttpServletResponse
HttpServletResponse httpServletResponse = mock(HttpServletResponse.class);
when(httpServletResponse.getOutputStream()).thenThrow(new IOException("TEST EXCEPTION"));
// when