### Question:
BaseRequest implements HttpRequest<T, U> { @Override public synchronized void close() { if (mResponse != null) { mResponse.disconnect(); mResponse = null; } } BaseRequest(); @Override void cancelRequest(); @Override synchronized void close(); @NonNull @Override String toString(); @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
    public ConnectionParameters mConnParams; }### Answer:
@Test public void close() throws Exception { mExpectedEx.expect(IOException.class); if (mClientType == USE_DEFAULT_HTTP) { mExpectedEx.expectMessage("stream is closed"); } else { mExpectedEx.expectMessage("closed"); } mEndPoint.enqueueConfigurationSuccess(); mRequest.mUri = Uri.parse(mEndPoint.getUrl()); mRequest.mConnParams = new ConnectionParameters.ParameterBuilder() .setRequestMethod(ConnectionParameters.RequestMethod.GET) .create(); HttpResponse response = mRequest.openConnection(mHttpClient); mRequest.close(); response.getContent().read(); }