### Question:
DownloadOkHttp3Connection implements DownloadConnection, DownloadConnection.Connected { @Override public void release() { request = null; if (response != null) response.close(); response = null; } DownloadOkHttp3Connection(@NonNull OkHttpClient client,
                              @NonNull Request.Builder requestBuilder);   DownloadOkHttp3Connection(@NonNull OkHttpClient client, @NonNull String url); @Override void addHeader(String name, String value); @Override Connected execute(); @Override void release(); @Override Map<String, List<String>> getRequestProperties(); @Override String getRequestProperty(String key); @Override int getResponseCode(); @Override InputStream getInputStream(); @Override boolean setRequestMethod(@NonNull String method); @Override Map<String, List<String>> getResponseHeaderFields(); @Override String getResponseHeaderField(String name); @Override String getRedirectLocation();  }### Answer:
@Test public void release() throws Exception { final Call call = mock(Call.class); when(client.newCall(any(Request.class))).thenReturn(call); final ResponseBody body = mock(ResponseBody.class); connection.response = createResponseBuilder() .body(body).build(); connection.release(); verify(body).close(); assertThat(connection.response).isNull(); }