@Test(expected = IOException.class)
public void responseTooBig() throws Exception {

    when(mHttpStack.performRequest(REQUEST, ADDITIONAL_HEADERS)).thenReturn(mHttpResponse);
    when(mStatusLine.getStatusCode()).thenReturn(12345);
    when(mHttpResponse.getAllHeaders()).thenReturn(new org.apache.http.Header[0]);
    when(mHttpResponse.getEntity()).thenReturn(mHttpEntity);
    when(mHttpEntity.getContentLength()).thenReturn(Integer.MAX_VALUE + 1L);
    when(mHttpEntity.getContent()).thenReturn(mContent);
    mAdaptedHttpStack.executeRequest(REQUEST, ADDITIONAL_HEADERS);
}