<T> List<List<T>> computePaths(Translator<Step, T> translator) {
    List<List<T>> taskPaths = new ArrayList<>();
    while (!startNodes.isEmpty()) {
      Iterator<GraphNode> iterator = startNodes.iterator();
      GraphNode start = iterator.next();
      iterator.remove();
      List<T> path = getPath(start, translator);
      taskPaths.add(path);
    }
    return taskPaths;
  }
@Test
  public void testComputePaths() throws Exception {
    WorkflowCreateRequest request =
        loadObject(
            "fixtures/workflows/request/sample-conditional-wf.json", WorkflowCreateRequest.class);
    WorkflowGraph graph =
        WorkflowGraph.build(
            request.getWorkflow(), WorkflowGraph.computeDag(request.getWorkflow(), null, null));
    List<List<String>> paths = graph.computePaths(new TestTranslator());
    Assert.assertEquals(3, paths.size());
    Assert.assertEquals(
        Arrays.asList("job.1", "job.2", "job.3", "#job.6", "job.6", "job.7"), paths.get(0));
    Assert.assertEquals(Collections.singletonList("job.4"), paths.get(1));
    Assert.assertEquals(Arrays.asList("#job.5", "job.5"), paths.get(2));
  }