@@ -0,0 +1,1014 @@
+package com.algolia.search.saas;%0A%0Aimport org.junit.Assume;%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Apublic class NetworkTest %7B%0A%0A  private APIClient client;%0A%0A  @Before%0A  public void init() %7B%0A    String applicationID = System.getenv(%22ALGOLIA_APPLICATION_ID%22);%0A    String apiKey = System.getenv(%22ALGOLIA_API_KEY%22);%0A    Assume.assumeFalse(%22You must set environement variables ALGOLIA_APPLICATION_ID and ALGOLIA_API_KEY to run the tests.%22, applicationID == null %7C%7C apiKey == null);%0A%0A    List%3CString%3E hosts = new ArrayList%3CString%3E();%0A    hosts.add(%22java-dsn.algolia.biz%22);%0A    hosts.add(applicationID + %22-1.algolianet.com%22);%0A%0A    client = new APIClient(applicationID, apiKey, hosts, hosts);%0A  %7D%0A%0A  @Test%0A  public void shouldHandleTimeoutsInDns() throws AlgoliaException %7B%0A    Long start = System.currentTimeMillis();%0A    client.listIndexes();%0A    assertTrue((System.currentTimeMillis() - start) %3C 3 * 1000);%0A  %7D%0A%0A%0A%7D%0A

Add test for DNS timeout