RxWear { 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"); } } RxWear(@NonNull Context ctx); void setDefaultTimeout(long time, @NonNull TimeUnit timeUnit); void resetDefaultTimeout(); Completable checkConnection(); Single<GoogleApiClient> getWearableClient(); Capability capability(); Channel channel(); Data data(); Message message(); Node node();  }
@Test public void setTimeout() { rxWear.setDefaultTimeout(TIMEOUT_TIME, TIMEOUT_TIMEUNIT); assertEquals(TIMEOUT_TIME, (long) rxWear.timeoutTime); assertEquals(TIMEOUT_TIMEUNIT, rxWear.timeoutUnit); }
@Test(expected = IllegalArgumentException.class) public void setTimeout_TimeUnitMissing() { rxWear.setDefaultTimeout(TIMEOUT_TIME, null); assertNull(rxWear.timeoutTime); assertNull(rxWear.timeoutUnit); }