test_class.declarator: factory = new PeekStageFactory()
test_class.modifier: private final
test_class.original_string: private final PeekStageFactory factory = new PeekStageFactory();
test_class.type: PeekStageFactory
test_class.var_name: factory
test_class.file: implementation/src/test/java/io/smallrye/reactive/streams/stages/PeekStageFactoryTest.java
test_class.identifier: PeekStageFactoryTest
test_class.superclass: extends StageTestBase
test_case.body: @Test
      public void create() throws ExecutionException, InterruptedException {
          Flowable<Integer> flowable = Flowable.fromArray(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
                  .subscribeOn(Schedulers.computation());
  
          List<Integer> squares = new ArrayList<>();
          List<String> strings = new ArrayList<>();
          List<String> list = ReactiveStreams.fromPublisher(flowable)
                  .filter(i -> i < 4)
                  .map(this::square)
                  .peek(squares::add)
                  .map(this::asString)
                  .peek(strings::add)
                  .toList()
                  .run().toCompletableFuture().get();
  
          assertThat(list).containsExactly("1", "4", "9");
          assertThat(squares).containsExactly(1, 4, 9);
          assertThat(strings).containsExactly("1", "4", "9");
      }
test_case.class_method_signature: PeekStageFactoryTest.create()
test_case.full_signature: @Test public void create()
test_case.identifier: create
test_case.invocations: subscribeOn fromArray computation get toCompletableFuture run toList peek map peek map filter fromPublisher containsExactly assertThat containsExactly assertThat containsExactly assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void create()
focal_class.file: implementation/src/main/java/io/smallrye/reactive/streams/stages/PeekStageFactory.java
focal_class.identifier: PeekStageFactory
focal_class.interfaces: implements ProcessingStageFactory<Stage.Peek>
focal_class.class_method_signature: PeekStageFactory.create(Engine engine, Stage.Peek stage)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public ProcessingStage<I, O> create(Engine engine, Stage.Peek stage)
focal_class.identifier: create
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (Engine engine, Stage.Peek stage)
focal_class.return: ProcessingStage<I, O>
focal_class.signature: ProcessingStage<I, O> create(Engine engine, Stage.Peek stage)
focal_method.body: @SuppressWarnings("unchecked")
      @Override
      public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.Peek stage) {
          Consumer<I> consumer = (Consumer<I>) Objects.requireNonNull(stage)
                  .getConsumer();
          Objects.requireNonNull(consumer);
          return source -> (Flowable<O>) source.doOnNext(consumer::accept);
      }
focal_method.class_method_signature: PeekStageFactory.create(Engine engine, Stage.Peek stage)
focal_method.full_signature: @SuppressWarnings("unchecked") @Override public ProcessingStage<I, O> create(Engine engine, Stage.Peek stage)
focal_method.identifier: create
focal_method.invocations: getConsumer requireNonNull requireNonNull doOnNext
focal_method.modifiers: @SuppressWarnings("unchecked") @Override public
focal_method.parameters: (Engine engine, Stage.Peek stage)
focal_method.return: ProcessingStage<I, O>
focal_method.signature: ProcessingStage<I, O> create(Engine engine, Stage.Peek stage)