@Test public void provideOkHttpClient_ReturnOkHttpClient() { ServerModule module = new ServerModule(); OkHttpClient client = module.provideOkHttpClient(); Assert.assertNotNull(client); }
@Provides OkHttpClient provideOkHttpClient() { return new OkHttpClient.Builder() .callTimeout(5, TimeUnit.MINUTES) .connectTimeout(5, TimeUnit.MINUTES) .readTimeout(5, TimeUnit.MINUTES) .writeTimeout(5, TimeUnit.MINUTES) .build(); }
ServerModule { @Provides OkHttpClient provideOkHttpClient() { return new OkHttpClient.Builder() .callTimeout(5, TimeUnit.MINUTES) .connectTimeout(5, TimeUnit.MINUTES) .readTimeout(5, TimeUnit.MINUTES) .writeTimeout(5, TimeUnit.MINUTES) .build(); } }
ServerModule { @Provides OkHttpClient provideOkHttpClient() { return new OkHttpClient.Builder() .callTimeout(5, TimeUnit.MINUTES) .connectTimeout(5, TimeUnit.MINUTES) .readTimeout(5, TimeUnit.MINUTES) .writeTimeout(5, TimeUnit.MINUTES) .build(); }  }
ServerModule { @Provides OkHttpClient provideOkHttpClient() { return new OkHttpClient.Builder() .callTimeout(5, TimeUnit.MINUTES) .connectTimeout(5, TimeUnit.MINUTES) .readTimeout(5, TimeUnit.MINUTES) .writeTimeout(5, TimeUnit.MINUTES) .build(); }   }
ServerModule { @Provides OkHttpClient provideOkHttpClient() { return new OkHttpClient.Builder() .callTimeout(5, TimeUnit.MINUTES) .connectTimeout(5, TimeUnit.MINUTES) .readTimeout(5, TimeUnit.MINUTES) .writeTimeout(5, TimeUnit.MINUTES) .build(); }    }