RxNetwork { @NonNull @RequiresPermission(ACCESS_NETWORK_STATE) public Observable<RxNetworkInfo> observe() { return observe(networkObservingStrategy); } @VisibleForTesting  RxNetwork(); @VisibleForTesting  RxNetwork(@NonNull Builder builder); @NonNull static RxNetwork init(@NonNull Context context); @NonNull static RxNetwork init(); @NonNull static Builder builder(); @NonNull @RequiresPermission(ACCESS_NETWORK_STATE) Observable<RxNetworkInfo> observe(); @NonNull @RequiresPermission(ACCESS_NETWORK_STATE) Observable<RxNetworkInfo> observe(@NonNull NetworkObservingStrategy strategy); @NonNull @RequiresPermission(ACCESS_NETWORK_STATE) Observable<Boolean> observeSimple(); @NonNull @RequiresPermission(INTERNET) Observable<Boolean> observeInternetAccess(); @NonNull @RequiresPermission(INTERNET) Observable<Boolean> observeInternetAccess(@NonNull InternetObservingStrategy strategy);  }
@Test public void shouldSubscribeCorrectly_toObserve() { sut.observe().test().assertSubscribed(); }
@Test(expected = NullPointerException.class) public void shouldThrow_whenTryingToObserveWithNullNetworkStrategy() { sut.observe(null); }