@Test(expected = NullPointerException.class) public void createWithoutFunction() { factory.create(null, () -> null); }
@SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.OnError stage) { Consumer<Throwable> consumer = Objects.requireNonNull(stage).getConsumer(); Objects.requireNonNull(consumer); return source -> (Flowable<O>) source.doOnError(consumer::accept); }
OnErrorStageFactory implements ProcessingStageFactory<Stage.OnError> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.OnError stage) { Consumer<Throwable> consumer = Objects.requireNonNull(stage).getConsumer(); Objects.requireNonNull(consumer); return source -> (Flowable<O>) source.doOnError(consumer::accept); } }
OnErrorStageFactory implements ProcessingStageFactory<Stage.OnError> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.OnError stage) { Consumer<Throwable> consumer = Objects.requireNonNull(stage).getConsumer(); Objects.requireNonNull(consumer); return source -> (Flowable<O>) source.doOnError(consumer::accept); }  }
OnErrorStageFactory implements ProcessingStageFactory<Stage.OnError> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.OnError stage) { Consumer<Throwable> consumer = Objects.requireNonNull(stage).getConsumer(); Objects.requireNonNull(consumer); return source -> (Flowable<O>) source.doOnError(consumer::accept); }  @SuppressWarnings("unchecked") @Override ProcessingStage<I, O> create(Engine engine, Stage.OnError stage); }
OnErrorStageFactory implements ProcessingStageFactory<Stage.OnError> { @SuppressWarnings("unchecked") @Override public <I, O> ProcessingStage<I, O> create(Engine engine, Stage.OnError stage) { Consumer<Throwable> consumer = Objects.requireNonNull(stage).getConsumer(); Objects.requireNonNull(consumer); return source -> (Flowable<O>) source.doOnError(consumer::accept); }  @SuppressWarnings("unchecked") @Override ProcessingStage<I, O> create(Engine engine, Stage.OnError stage);  }