### Question:
FromIterableStageFactory implements PublisherStageFactory<Stage.Of> { @SuppressWarnings("unchecked") @Override public <O> PublisherStage<O> create(Engine engine, Stage.Of stage) { Iterable<O> elements = (Iterable<O>) Objects.requireNonNull(Objects.requireNonNull(stage).getElements()); return () -> Multi.createFrom().iterable(elements); }  @SuppressWarnings("unchecked") @Override PublisherStage<O> create(Engine engine, Stage.Of stage);  }### Answer:
@Test public void create() throws ExecutionException, InterruptedException { List<Integer> list = ReactiveStreams.of(1, 2, 3).toList().run().toCompletableFuture().get(); assertThat(list).containsExactly(1, 2, 3); Optional<Integer> res = ReactiveStreams.of(25).findFirst().run().toCompletableFuture().get(); assertThat(res).contains(25); Optional<?> empty = ReactiveStreams.fromIterable(Collections.emptyList()).findFirst().run() .toCompletableFuture().get(); assertThat(empty).isEmpty(); }
@Test public void createWithoutStage() { assertThrows(NullPointerException.class, () -> factory.create(null, null)); }
@Test public void createWithoutFunction() { assertThrows(NullPointerException.class, () -> factory.create(null, () -> null)); }