### Question:
FailedPublisherStageFactory implements PublisherStageFactory<Stage.Failed> { @Override public <O> PublisherStage<O> create(Engine engine, Stage.Failed stage) { Throwable error = Objects.requireNonNull(Objects.requireNonNull(stage).getError()); return () -> Multi.createFrom().failure(error); }  @Override PublisherStage<O> create(Engine engine, Stage.Failed stage);  }### Answer:
@Test public void createWithError() { Exception failure = new Exception("Boom"); PublisherStage<Object> boom = factory.create(null, () -> failure); boom.get().subscribe().withSubscriber(AssertSubscriber.create()) .assertHasFailedWith(Exception.class, "Boom"); }
@Test public void createWithoutStage() { assertThrows(NullPointerException.class, () -> factory.create(null, null)); }
@Test public void createWithoutError() { assertThrows(NullPointerException.class, () -> factory.create(null, () -> null)); }