// Path: extensions/net/src/main/java/com/google/android/agera/net/HttpFunctions.java
// @NonNull
// public static Function<HttpRequest, Result<HttpResponse>> httpFunction() {
//   return HTTP_FUNCTION;
// }
// 
// Path: extensions/net/src/main/java/com/google/android/agera/net/HttpRequests.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static HTHeaderFieldRedirectsCachesConnectionTimeoutReadTimeoutCompile
// httpDeleteRequest(@NonNull final String url) {
//   return new HttpRequestCompiler("DELETE", url);
// }
// 
// Path: extensions/net/src/main/java/com/google/android/agera/net/HttpRequests.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static HTHeaderFieldRedirectsCachesConnectionTimeoutReadTimeoutCompile
// httpGetRequest(@NonNull final String url) {
//   return new HttpRequestCompiler("GET", url);
// }
// 
// Path: extensions/net/src/main/java/com/google/android/agera/net/HttpRequests.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static HTBodyHeaderFieldRedirectsCachesConnectionTimeoutReadTimeoutCompile
// httpPostRequest(@NonNull final String url) {
//   return new HttpRequestCompiler("POST", url);
// }
// 
// Path: extensions/net/src/main/java/com/google/android/agera/net/HttpRequests.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static HTBodyHeaderFieldRedirectsCachesConnectionTimeoutReadTimeoutCompile
// httpPutRequest(@NonNull final String url) {
//   return new HttpRequestCompiler("PUT", url);
// }


import static com.google.android.agera.net.HttpFunctions.httpFunction;
import static com.google.android.agera.net.HttpRequests.httpDeleteRequest;
import static com.google.android.agera.net.HttpRequests.httpGetRequest;
import static com.google.android.agera.net.HttpRequests.httpPostRequest;
import static com.google.android.agera.net.HttpRequests.httpPutRequest;
import static com.google.android.agera.net.test.matchers.HasPrivateConstructor.hasPrivateConstructor;
import static java.util.Collections.singletonList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.ProtocolException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
import java.net.URLStreamHandlerFactory;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
  private static final String POST_METHOD = "POST";
  private static final String PUT_METHOD = "PUT";
  private static final String DELETE_METHOD = "DELETE";
  private static final byte[] EMPTY_BODY = new byte[0];

  private static HttpURLConnection mockHttpURLConnection;

  @BeforeClass
  public static void onlyOnce() throws Throwable {
    mockHttpURLConnection = mock(HttpURLConnection.class);
    URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() {
      @Override
      public URLStreamHandler createURLStreamHandler(final String s) {
        return s.equals(TEST_PROTOCOL) ? new URLStreamHandler() {
          @Override
          protected URLConnection openConnection(final URL url) throws IOException {
            return mockHttpURLConnection;
          }
        } : null;
      }
    });
  }

  @After
  public void tearDown() {
    reset(mockHttpURLConnection);
  }

  @Test
  public void shouldPassOnGetMethod() throws Throwable {
// Path: extensions/net/src/main/java/com/google/android/agera/net/HttpFunctions.java
// @NonNull
// public static Function<HttpRequest, Result<HttpResponse>> httpFunction() {
//   return HTTP_FUNCTION;
// }
// 
// Path: extensions/net/src/main/java/com/google/android/agera/net/HttpRequests.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static HTHeaderFieldRedirectsCachesConnectionTimeoutReadTimeoutCompile
// httpDeleteRequest(@NonNull final String url) {
//   return new HttpRequestCompiler("DELETE", url);
// }
// 
// Path: extensions/net/src/main/java/com/google/android/agera/net/HttpRequests.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static HTHeaderFieldRedirectsCachesConnectionTimeoutReadTimeoutCompile
// httpGetRequest(@NonNull final String url) {
//   return new HttpRequestCompiler("GET", url);
// }
// 
// Path: extensions/net/src/main/java/com/google/android/agera/net/HttpRequests.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static HTBodyHeaderFieldRedirectsCachesConnectionTimeoutReadTimeoutCompile
// httpPostRequest(@NonNull final String url) {
//   return new HttpRequestCompiler("POST", url);
// }
// 
// Path: extensions/net/src/main/java/com/google/android/agera/net/HttpRequests.java
// @NonNull
// @SuppressWarnings("unchecked")
// public static HTBodyHeaderFieldRedirectsCachesConnectionTimeoutReadTimeoutCompile
// httpPutRequest(@NonNull final String url) {
//   return new HttpRequestCompiler("PUT", url);
// }


// Path: extensions/net/src/test/java/com/google/android/agera/net/HttpFunctionsTest.java
import static com.google.android.agera.net.HttpFunctions.httpFunction;
import static com.google.android.agera.net.HttpRequests.httpDeleteRequest;
import static com.google.android.agera.net.HttpRequests.httpGetRequest;
import static com.google.android.agera.net.HttpRequests.httpPostRequest;
import static com.google.android.agera.net.HttpRequests.httpPutRequest;
import static com.google.android.agera.net.test.matchers.HasPrivateConstructor.hasPrivateConstructor;
import static java.util.Collections.singletonList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasEntry;
import static org.hamcrest.Matchers.instanceOf;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doThrow;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.reset;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.verifyZeroInteractions;
import static org.mockito.Mockito.when;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.ProtocolException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;
import java.net.URLStreamHandlerFactory;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;

  private static final String POST_METHOD = "POST";
  private static final String PUT_METHOD = "PUT";
  private static final String DELETE_METHOD = "DELETE";
  private static final byte[] EMPTY_BODY = new byte[0];

  private static HttpURLConnection mockHttpURLConnection;

  @BeforeClass
  public static void onlyOnce() throws Throwable {
    mockHttpURLConnection = mock(HttpURLConnection.class);
    URL.setURLStreamHandlerFactory(new URLStreamHandlerFactory() {
      @Override
      public URLStreamHandler createURLStreamHandler(final String s) {
        return s.equals(TEST_PROTOCOL) ? new URLStreamHandler() {
          @Override
          protected URLConnection openConnection(final URL url) throws IOException {
            return mockHttpURLConnection;
          }
        } : null;
      }
    });
  }

  @After
  public void tearDown() {
    reset(mockHttpURLConnection);
  }

  @Test
  public void shouldPassOnGetMethod() throws Throwable {
    assertThat(httpFunction()