@Test(expected = UnsupportedStageException.class)
public void testCreatingPublisherWithUnknownStage() {

    engine = new Engine();
    List<Stage> stages = new ArrayList<>();
    stages.add(new Stage() {
        // Unknown stage.
    });
    stages.add((Stage.Map) () -> i -> (int) i + 1);
    Graph graph = () -> stages;
    engine.buildPublisher(graph);
}