@Test(expected = NullPointerException.class) public void testWithoutEngine() { Graph g1 = () -> Collections.singletonList((Stage.Of) () -> Arrays.asList(1, 2, 3)); Graph g2 = () -> Collections.singletonList((Stage.Of) () -> Arrays.asList(1, 2, 3)); factory.create(null, new Stage.Concat() { @Override public Graph getFirst() { return g1; } @Override public Graph getSecond() { return g2; } }); }
@Override public <O> PublisherStage<O> create(Engine engine, Stage.Concat stage) { Objects.requireNonNull(engine); Objects.requireNonNull(stage); Graph g1 = stage.getFirst(); Graph g2 = stage.getSecond(); return new ConcatStage<>(engine, g1, g2); }
ConcatStageFactory implements PublisherStageFactory<Stage.Concat> { @Override public <O> PublisherStage<O> create(Engine engine, Stage.Concat stage) { Objects.requireNonNull(engine); Objects.requireNonNull(stage); Graph g1 = stage.getFirst(); Graph g2 = stage.getSecond(); return new ConcatStage<>(engine, g1, g2); } }
ConcatStageFactory implements PublisherStageFactory<Stage.Concat> { @Override public <O> PublisherStage<O> create(Engine engine, Stage.Concat stage) { Objects.requireNonNull(engine); Objects.requireNonNull(stage); Graph g1 = stage.getFirst(); Graph g2 = stage.getSecond(); return new ConcatStage<>(engine, g1, g2); }  }
ConcatStageFactory implements PublisherStageFactory<Stage.Concat> { @Override public <O> PublisherStage<O> create(Engine engine, Stage.Concat stage) { Objects.requireNonNull(engine); Objects.requireNonNull(stage); Graph g1 = stage.getFirst(); Graph g2 = stage.getSecond(); return new ConcatStage<>(engine, g1, g2); }  @Override PublisherStage<O> create(Engine engine, Stage.Concat stage); }
ConcatStageFactory implements PublisherStageFactory<Stage.Concat> { @Override public <O> PublisherStage<O> create(Engine engine, Stage.Concat stage) { Objects.requireNonNull(engine); Objects.requireNonNull(stage); Graph g1 = stage.getFirst(); Graph g2 = stage.getSecond(); return new ConcatStage<>(engine, g1, g2); }  @Override PublisherStage<O> create(Engine engine, Stage.Concat stage);  }