public static <X> CompletionStage<List<X>> toListFuture(Publisher<X> publisher) {
    Objects.requireNonNull(publisher, "publisher");
    return Flowable.fromPublisher(publisher).toList().to(singleToFuture());
  }
Set of utilities to convert {@link Publisher} into {@link CompletionStage}, {@code List}, other types
or add some blocking operations.

<p>Currently this class uses rxjava. This is the only place where rxjava is used in {@code common}
module. One needs to create rxjava independent converters at some point.
TODO:  remove rxjava2 depedency
criteria/common/src/org/immutables/criteria/repository/Publishers.java