### Question:
BaseRequest implements HttpRequest<T, U> { @WorkerThread protected HttpResponse openConnection(OktaHttpClient client) throws Exception { Preconditions.checkArgument(HTTPS_SCHEME.equals(mUri.getScheme()), "only https connections are permitted"); InputStream stream = client.connect(mUri, mConnParams); if (mCanceled) { throw new IOException("Canceled"); } boolean keepOpen = false; try { int responseCode = client.getResponseCode(); if (responseCode == -1) { throw new IOException("Invalid response code -1 no code can be discerned"); } if (!hasResponseBody(responseCode)) { mResponse = new HttpResponse(responseCode, client.getHeaderFields()); } else { keepOpen = true; mResponse = new HttpResponse( responseCode, client.getHeaderFields(), client.getContentLength(), stream, client); } return mResponse; } finally { if (!keepOpen) { close(); } } } BaseRequest(); @Override void cancelRequest(); @Override synchronized void close(); @NonNull @Override String toString(); @VisibleForTesting(otherwise = VisibleForTesting.PACKAGE_PRIVATE)
    public ConnectionParameters mConnParams; }### Answer:
@Test public void openConnection() throws Exception { mEndPoint.enqueueReturnSuccessEmptyBody(); mRequest.mUri = Uri.parse(mEndPoint.getUrl()); mRequest.mConnParams = new ConnectionParameters.ParameterBuilder() .setRequestMethod(ConnectionParameters.RequestMethod.GET) .create(); HttpResponse response = mRequest.openConnection(mHttpClient); assertEquals(response.getStatusCode(), HTTP_OK); }