@Test
public void nonEmptyResponse() 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((long) Integer.MAX_VALUE);
    when(mHttpEntity.getContent()).thenReturn(mContent);
    com.android.volley.toolbox.HttpResponse response =
            mAdaptedHttpStack.executeRequest(REQUEST, ADDITIONAL_HEADERS);
    assertEquals(12345, response.getStatusCode());
    assertEquals(Collections.emptyList(), response.getHeaders());
    assertEquals(Integer.MAX_VALUE, response.getContentLength());
    assertSame(mContent, response.getContent());
}