test_class.declarator: factory = new FromPublisherStageFactory()
test_class.modifier: private final
test_class.original_string: private final FromPublisherStageFactory factory = new FromPublisherStageFactory();
test_class.type: FromPublisherStageFactory
test_class.var_name: factory
test_class.file: implementation/src/test/java/io/smallrye/reactive/streams/stages/FromPublisherStageFactoryTest.java
test_class.identifier: FromPublisherStageFactoryTest
test_class.superclass: extends StageTestBase
test_case.body: @Test
      public void create() throws ExecutionException, InterruptedException {
          List<Integer> list = ReactiveStreams.fromPublisher(Flowable.fromArray(1, 2, 3)).toList().run().toCompletableFuture()
                  .get();
          assertThat(list).containsExactly(1, 2, 3);
  
          Optional<Integer> res = ReactiveStreams.fromPublisher(Flowable.just(25)).findFirst().run().toCompletableFuture().get();
          assertThat(res).contains(25);
  
          Optional<?> empty = ReactiveStreams.fromPublisher(Flowable.empty()).findFirst().run().toCompletableFuture().get();
          assertThat(empty).isEmpty();
  
          try {
              ReactiveStreams.fromPublisher(Flowable.error(new Exception("Boom"))).findFirst().run()
                      .toCompletableFuture().get();
              fail("Exception should be thrown");
          } catch (Exception e) {
              assertThat(e).hasMessageContaining("Boom");
          }
      }
test_case.class_method_signature: FromPublisherStageFactoryTest.create()
test_case.full_signature: @Test public void create()
test_case.identifier: create
test_case.invocations: get toCompletableFuture run toList fromPublisher fromArray containsExactly assertThat get toCompletableFuture run findFirst fromPublisher just contains assertThat get toCompletableFuture run findFirst fromPublisher empty isEmpty assertThat get toCompletableFuture run findFirst fromPublisher error fail hasMessageContaining 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/FromPublisherStageFactory.java
focal_class.identifier: FromPublisherStageFactory
focal_class.interfaces: implements PublisherStageFactory<Stage.PublisherStage>
focal_class.class_method_signature: FromPublisherStageFactory.create(Engine engine, Stage.PublisherStage stage)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public PublisherStage<O> create(Engine engine, Stage.PublisherStage stage)
focal_class.identifier: create
focal_class.modifiers: @SuppressWarnings("unchecked") @Override public
focal_class.parameters: (Engine engine, Stage.PublisherStage stage)
focal_class.return: PublisherStage<O>
focal_class.signature: PublisherStage<O> create(Engine engine, Stage.PublisherStage stage)
focal_method.body: @SuppressWarnings("unchecked")
      @Override
      public <O> PublisherStage<O> create(Engine engine, Stage.PublisherStage stage) {
          Publisher<O> publisher = (Publisher<O>) Objects.requireNonNull(Objects.requireNonNull(stage.getRsPublisher()));
          return () -> Flowable.fromPublisher(publisher);
      }
focal_method.class_method_signature: FromPublisherStageFactory.create(Engine engine, Stage.PublisherStage stage)
focal_method.full_signature: @SuppressWarnings("unchecked") @Override public PublisherStage<O> create(Engine engine, Stage.PublisherStage stage)
focal_method.identifier: create
focal_method.invocations: requireNonNull requireNonNull getRsPublisher fromPublisher
focal_method.modifiers: @SuppressWarnings("unchecked") @Override public
focal_method.parameters: (Engine engine, Stage.PublisherStage stage)
focal_method.return: PublisherStage<O>
focal_method.signature: PublisherStage<O> create(Engine engine, Stage.PublisherStage stage)