@Test(expected = NullPointerException.class) public void createWithoutStage() { factory.create(new Engine(), null); }
@SuppressWarnings("unchecked") @Override public <I, O> TerminalStage<I, O> create(Engine engine, Stage.SubscriberStage stage) { Subscriber<I> subscriber = (Subscriber<I>) Objects.requireNonNull(stage).getRsSubscriber(); Objects.requireNonNull(subscriber); return (TerminalStage<I, O>) new SubscriberStage<>(subscriber); }
SubscriberStageFactory implements TerminalStageFactory<Stage.SubscriberStage> { @SuppressWarnings("unchecked") @Override public <I, O> TerminalStage<I, O> create(Engine engine, Stage.SubscriberStage stage) { Subscriber<I> subscriber = (Subscriber<I>) Objects.requireNonNull(stage).getRsSubscriber(); Objects.requireNonNull(subscriber); return (TerminalStage<I, O>) new SubscriberStage<>(subscriber); } }
SubscriberStageFactory implements TerminalStageFactory<Stage.SubscriberStage> { @SuppressWarnings("unchecked") @Override public <I, O> TerminalStage<I, O> create(Engine engine, Stage.SubscriberStage stage) { Subscriber<I> subscriber = (Subscriber<I>) Objects.requireNonNull(stage).getRsSubscriber(); Objects.requireNonNull(subscriber); return (TerminalStage<I, O>) new SubscriberStage<>(subscriber); }  }
SubscriberStageFactory implements TerminalStageFactory<Stage.SubscriberStage> { @SuppressWarnings("unchecked") @Override public <I, O> TerminalStage<I, O> create(Engine engine, Stage.SubscriberStage stage) { Subscriber<I> subscriber = (Subscriber<I>) Objects.requireNonNull(stage).getRsSubscriber(); Objects.requireNonNull(subscriber); return (TerminalStage<I, O>) new SubscriberStage<>(subscriber); }  @SuppressWarnings("unchecked") @Override TerminalStage<I, O> create(Engine engine, Stage.SubscriberStage stage); }
SubscriberStageFactory implements TerminalStageFactory<Stage.SubscriberStage> { @SuppressWarnings("unchecked") @Override public <I, O> TerminalStage<I, O> create(Engine engine, Stage.SubscriberStage stage) { Subscriber<I> subscriber = (Subscriber<I>) Objects.requireNonNull(stage).getRsSubscriber(); Objects.requireNonNull(subscriber); return (TerminalStage<I, O>) new SubscriberStage<>(subscriber); }  @SuppressWarnings("unchecked") @Override TerminalStage<I, O> create(Engine engine, Stage.SubscriberStage stage);  }