### Question:
DownloadOkHttp3Connection implements DownloadConnection, DownloadConnection.Connected { @Override public boolean setRequestMethod(@NonNull String method) throws ProtocolException { this.requestBuilder.method(method, null); return true; } 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 setRequestMethod() throws ProtocolException { final Request.Builder builder = mock(Request.Builder.class); final DownloadOkHttp3Connection connection = new DownloadOkHttp3Connection(client, builder); assertThat(connection.setRequestMethod("HEAD")).isTrue(); verify(builder).method(eq("HEAD"), nullable(RequestBody.class)); }