  @Test
  public void testGetWithoutHeaders() throws Exception {

    OkHttpClient httpClient = mock(OkHttpClient.class);
    when(httpClient.newCall(any(Request.class))).thenAnswer(new Answer<Object>() {
      @Override
      public Object answer(InvocationOnMock invocation) throws Throwable {
        Call callMock = mock(Call.class);
        return callMock;
      }
    });
    OkHttpClient.Builder clientBuilder = mock(OkHttpClient.Builder.class);
    when(clientBuilder.build()).thenReturn(httpClient);
    when(httpClient.newBuilder()).thenReturn(clientBuilder);
    NetworkingModule networkingModule =
      new NetworkingModule(mock(ReactApplicationContext.class), "", httpClient);

    networkingModule.sendRequest(
      mock(ExecutorToken.class),
      "GET",
      "http://somedomain/foo",
      /* requestId */ 0,
      /* headers */ JavaOnlyArray.of(),
      /* body */ null,
      /* responseType */ "text",
      /* useIncrementalUpdates*/ true,
      /* timeout */ 0);

    ArgumentCaptor<Request> argumentCaptor = ArgumentCaptor.forClass(Request.class);
    verify(httpClient).newCall(argumentCaptor.capture());
    assertThat(argumentCaptor.getValue().url().toString()).isEqualTo("http://somedomain/foo");
    // We set the User-Agent header by default
    assertThat(argumentCaptor.getValue().headers().size()).isEqualTo(1);
    assertThat(argumentCaptor.getValue().method()).isEqualTo("GET");
  }