docs: @Override
      public <T> Promise<T> toPromise(Consumer<Handler<AsyncResult<T>>> consumer) {
          Deferred<T> d = when.defer();
          consumer.accept(toHandler(d));
          return d.getPromise();
      }