class MultiRepetition {

    public <S, T> UniRepeat<T> completionStage(Supplier<S> stateSupplier,
            Function<S, ? extends CompletionStage<? extends T>> producer) {
        ParameterValidation.nonNull(producer, "producer");
        return uni(stateSupplier, s -> Uni.createFrom().completionStage(producer.apply(s)));
    }

}