docs: public static Predicate<Connectivity> hasState(final NetworkInfo.State... states) {
      return new Predicate<Connectivity>() {
        @Override public boolean test(@NonNull Connectivity connectivity) throws Exception {
          for (NetworkInfo.State state : states) {
            if (connectivity.state() == state) {
              return true;
            }
          }
          return false;
        }
      };
    }