@Test
public void testRedirectNoSetCookieFollowsRedirect_dataSourceHandlesSetCookie()
    throws HttpDataSourceException {

  dataSourceUnderTest =
      new CronetDataSource(
          mockCronetEngine,
          mockExecutor,
          TEST_CONNECT_TIMEOUT_MS,
          TEST_READ_TIMEOUT_MS,
          /* resetTimeoutOnRedirects= */ true,
          Clock.DEFAULT,
          /* defaultRequestProperties= */ null,
          /* handleSetCookieRequests= */ true);
  dataSourceUnderTest.addTransferListener(mockTransferListener);
  mockSingleRedirectSuccess();
  mockFollowRedirectSuccess();
  dataSourceUnderTest.open(testDataSpec);
  verify(mockUrlRequestBuilder, never()).addHeader(eq("Cookie"), any(String.class));
  verify(mockUrlRequest).followRedirect();
}