@Test
public void executeRequestClosesConnection_hasResponseBody() throws Exception {

    when(mMockConnection.getResponseCode()).thenReturn(HttpURLConnection.HTTP_OK);
    when(mMockConnection.getInputStream())
            .thenReturn(new ByteArrayInputStream("hello".getBytes(StandardCharsets.UTF_8)));
    HttpResponse response =
            mHurlStack.executeRequest(
                    new TestRequest.Get(), Collections.<String, String>emptyMap());
    // Shouldn't be disconnected until the stream is consumed.
    verify(mMockConnection, never()).disconnect();
    response.getContent().close();
    verify(mMockConnection).disconnect();
}