  @Test
  public void testNoEdgeNodesInDag() {

    Service s1 = Service.builder().setName("s1").build();
    Node node1 = new Node("node1", "1", ImmutableSet.<Service>of(s1),
                          NodeProperties.builder().setHostname("host1").addIPAddress("access_v4", "ip1").build());
    Node node2 = new Node("node2", "1", ImmutableSet.<Service>of(s1),
                          NodeProperties.builder().setHostname("host2").addIPAddress("access_v4", "ip2").build());
    Set<Node> clusterNodes = ImmutableSet.of(node1, node2);

    TaskDag expected = new TaskDag();
    TaskNode taskNode1 = new TaskNode(node1.getId(), ProvisionerAction.DELETE.name(), "");
    TaskNode taskNode2 = new TaskNode(node2.getId(), ProvisionerAction.DELETE.name(), "");
    expected.addTaskNode(taskNode1);
    expected.addTaskNode(taskNode2);

    ClusterJob job = new ClusterJob(JobId.fromString("123-001"), ClusterAction.CLUSTER_DELETE);
    JobPlanner planner = new JobPlanner(job, clusterNodes);
    TaskDag actual = planner.createTaskDag();

    Assert.assertEquals(expected, actual);

    List<Set<TaskNode>> linearizedTasks = actual.linearize();
    Assert.assertEquals(1, linearizedTasks.size());
    Assert.assertEquals(2, linearizedTasks.get(0).size());
    Assert.assertTrue(linearizedTasks.get(0).contains(taskNode1));
    Assert.assertTrue(linearizedTasks.get(0).contains(taskNode2));
  }