public static String toDotString(Pipeline pipeline) {
    final PipelineDotRenderer visitor = new PipelineDotRenderer();
    visitor.begin();
    pipeline.traverseTopologically(visitor);
    visitor.end();
    return visitor.dotBuilder.toString();
  }
@Test
  public void testEmptyPipeline() {
    assertEquals(
        "digraph {"
            + "    rankdir=LR"
            + "    subgraph cluster_0 {"
            + "        label = \"\""
            + "    }"
            + "}",
        PipelineDotRenderer.toDotString(p).replaceAll(System.lineSeparator(), ""));
  }