test_class.declarator: factory = new CollectStageFactory()
test_class.modifier: private final
test_class.original_string: private final CollectStageFactory factory = new CollectStageFactory();
test_class.type: CollectStageFactory
test_class.var_name: factory
test_class.file: implementation/src/test/java/io/smallrye/reactive/streams/stages/CollectStageFactoryTest.java
test_class.identifier: CollectStageFactoryTest
test_class.superclass: extends StageTestBase
test_case.body: @Test
      public void create() throws ExecutionException, InterruptedException {
          TerminalStage<Integer, Integer> terminal = factory.create(null,
                  () -> Collectors.summingInt((ToIntFunction<Integer>) value -> value));
  
          List<Integer> list = new ArrayList<>();
          Flowable<Integer> flowable = Flowable.fromArray(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)
                  .doOnNext(list::add)
                  .subscribeOn(Schedulers.computation());
          CompletionStage<Integer> stage = terminal.apply(flowable);
          Integer result = stage.toCompletableFuture().get();
  
          assertThat(result).isEqualTo(1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10);
          assertThat(list).hasSize(10);
      }
test_case.class_method_signature: CollectStageFactoryTest.create()
test_case.full_signature: @Test public void create()
test_case.identifier: create
test_case.invocations: create summingInt subscribeOn doOnNext fromArray computation apply get toCompletableFuture isEqualTo assertThat hasSize 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/CollectStageFactory.java
focal_class.identifier: CollectStageFactory
focal_class.interfaces: implements TerminalStageFactory<Stage.Collect>
focal_class.class_method_signature: CollectStageFactory.create(Engine engine, Stage.Collect stage)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public TerminalStage<I, O> create(Engine engine, Stage.Collect stage)
focal_class.identifier: create
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (Engine engine, Stage.Collect stage)
focal_class.return: TerminalStage<I, O>
focal_class.signature: TerminalStage<I, O> create(Engine engine, Stage.Collect stage)
focal_method.body: @SuppressWarnings("unchecked")
      @Override
      public <I, O> TerminalStage<I, O> create(Engine engine, Stage.Collect stage) {
          Collector<I, Object, O> collector = (Collector<I, Object, O>) Objects.requireNonNull(stage).getCollector();
          Objects.requireNonNull(collector);
          return new CollectStage<>(collector);
      }
focal_method.class_method_signature: CollectStageFactory.create(Engine engine, Stage.Collect stage)
focal_method.full_signature: @SuppressWarnings("unchecked") @Override public TerminalStage<I, O> create(Engine engine, Stage.Collect stage)
focal_method.identifier: create
focal_method.invocations: getCollector requireNonNull requireNonNull
focal_method.modifiers: @SuppressWarnings("unchecked") @Override public
focal_method.parameters: (Engine engine, Stage.Collect stage)
focal_method.return: TerminalStage<I, O>
focal_method.signature: TerminalStage<I, O> create(Engine engine, Stage.Collect stage)