@Test(expected = NullPointerException.class) public void createWithoutCollector() { factory.create(null, () -> null); }
@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); }
CollectStageFactory implements TerminalStageFactory<Stage.Collect> { @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); } }
CollectStageFactory implements TerminalStageFactory<Stage.Collect> { @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); }  }
CollectStageFactory implements TerminalStageFactory<Stage.Collect> { @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); }  @SuppressWarnings("unchecked") @Override TerminalStage<I, O> create(Engine engine, Stage.Collect stage); }
CollectStageFactory implements TerminalStageFactory<Stage.Collect> { @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); }  @SuppressWarnings("unchecked") @Override TerminalStage<I, O> create(Engine engine, Stage.Collect stage);  }