### Question:
MultiRepetition { public <T> UniRepeat<T> supplier(Supplier<? extends T> supplier) { return new UniRepeat<>(Uni.createFrom().item(supplier)); }  UniRepeat<T> uni(Supplier<S> stateSupplier, Function<S, Uni<? extends T>> producer); UniRepeat<T> uni(Supplier<Uni<? extends T>> uniSupplier); UniRepeat<T> completionStage(Supplier<S> stateSupplier,
            Function<S, ? extends CompletionStage<? extends T>> producer); UniRepeat<T> completionStage(Supplier<? extends CompletionStage<? extends T>> supplier); UniRepeat<T> uni(Supplier<S> stateSupplier,
            BiConsumer<S, UniEmitter<? super T>> consumer); UniRepeat<T> uni(Consumer<UniEmitter<? super T>> consumer); UniRepeat<T> supplier(Supplier<? extends T> supplier); UniRepeat<T> supplier(Supplier<S> stateSupplier, Function<S, ? extends T> producer);  }### Answer:
@Test public void testWithItemWithSharedState() { AtomicInteger shared = new AtomicInteger(); Multi<Integer> multi = Multi.createBy().repeating() .supplier(() -> shared, (state) -> shared.incrementAndGet()) .atMost(2); assertThat(shared).hasValue(0); AssertSubscriber<Integer> subscriber = multi.subscribe() .withSubscriber(AssertSubscriber.create(1)); subscriber.assertReceived(1); assertThat(shared).hasValue(1); subscriber.request(1); subscriber.assertCompletedSuccessfully().assertReceived(1, 2); }
@Test public void testWithItem() { AtomicInteger shared = new AtomicInteger(); Multi<Integer> multi = Multi.createBy().repeating() .supplier(shared::incrementAndGet) .atMost(2); assertThat(shared).hasValue(0); AssertSubscriber<Integer> subscriber = multi.subscribe() .withSubscriber(AssertSubscriber.create(1)); subscriber.assertReceived(1); assertThat(shared).hasValue(1); subscriber.request(1); subscriber.assertCompletedSuccessfully().assertReceived(1, 2); }