ReactiveNetwork { public static ReactiveNetwork create() { return new ReactiveNetwork(); } protected  ReactiveNetwork(); static ReactiveNetwork create(); @RequiresPermission(Manifest.permission.ACCESS_NETWORK_STATE) static Observable<Connectivity> observeNetworkConnectivity(final Context context); @RequiresPermission(Manifest.permission.ACCESS_NETWORK_STATE) static Observable<Connectivity> observeNetworkConnectivity(final Context context,
      final NetworkObservingStrategy strategy); @RequiresPermission(Manifest.permission.INTERNET) static Observable<Boolean> observeInternetConnectivity(); @RequiresPermission(Manifest.permission.INTERNET) static Observable<Boolean> observeInternetConnectivity(
      InternetObservingSettings settings); @RequiresPermission(Manifest.permission.INTERNET) static Single<Boolean> checkInternetConnectivity(); @RequiresPermission(Manifest.permission.INTERNET) static Single<Boolean> checkInternetConnectivity(InternetObservingSettings settings); final static String LOG_TAG; }
@Test public void testReactiveNetworkObjectShouldNotBeNull() { ReactiveNetwork reactiveNetwork; reactiveNetwork = ReactiveNetwork.create(); assertThat(reactiveNetwork).isNotNull(); }
@Test public void shouldHaveJustSevenMethodsInPublicApi() { Class<? extends ReactiveNetwork> clazz = ReactiveNetwork.create().getClass(); final int predefinedNumberOfMethods = 9; final int publicMethodsInApi = 7; Method[] methods = clazz.getMethods(); assertThat(methods.length).isEqualTo(predefinedNumberOfMethods + publicMethodsInApi); }