@Test public void createWithoutStage() { assertThrows(NullPointerException.class, () -> factory.create(null, null)); }
@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 -> (Multi<O>) source .onItem().invoke(consumer); }
PeekStageFactory implements ProcessingStageFactory<Stage.Peek> { @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 -> (Multi<O>) source .onItem().invoke(consumer); } }
PeekStageFactory implements ProcessingStageFactory<Stage.Peek> { @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 -> (Multi<O>) source .onItem().invoke(consumer); }  }
PeekStageFactory implements ProcessingStageFactory<Stage.Peek> { @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 -> (Multi<O>) source .onItem().invoke(consumer); }  @SuppressWarnings("unchecked") @Override ProcessingStage<I, O> create(Engine engine, Stage.Peek stage); }
PeekStageFactory implements ProcessingStageFactory<Stage.Peek> { @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 -> (Multi<O>) source .onItem().invoke(consumer); }  @SuppressWarnings("unchecked") @Override ProcessingStage<I, O> create(Engine engine, Stage.Peek stage);  }