RxFit { public void setDefaultTimeout(long time, @NonNull TimeUnit timeUnit) { if(timeUnit != null) { timeoutTime = time; timeoutUnit = timeUnit; } else { throw new IllegalArgumentException("timeUnit parameter must not be null"); } } RxFit(@NonNull Context ctx, @NonNull Api<? extends Api.ApiOptions.NotRequiredOptions>[] apis, @NonNull Scope[] scopes);  RxFit(@NonNull Context ctx, @NonNull Api<? extends Api.ApiOptions.NotRequiredOptions>[] apis, @NonNull Scope[] scopes, boolean handleResolutions); void setDefaultTimeout(long time, @NonNull TimeUnit timeUnit); void resetDefaultTimeout(); Completable checkConnection(); Ble ble(); Config config(); Goals goals(); History history(); Recording recording(); Sensors sensors(); Sessions sessions();  }
@Test public void setTimeout() { rxFit.setDefaultTimeout(TIMEOUT_TIME, TIMEOUT_TIMEUNIT); assertEquals(TIMEOUT_TIME, (long) rxFit.timeoutTime); assertEquals(TIMEOUT_TIMEUNIT, rxFit.timeoutUnit); }
@Test(expected = IllegalArgumentException.class) public void setTimeout_TimeUnitMissing() { rxFit.setDefaultTimeout(TIMEOUT_TIME, null); assertNull(rxFit.timeoutTime); assertNull(rxFit.timeoutUnit); }