@Test
  public void testGetUnfinishedLeafTasks_differentUpdateOrder() {
    AllocationCompletionTracker tracker = new AllocationCompletionTracker();
    tracker.updateProgress(AllocationTree.root, 0);
    Assert.assertEquals(Arrays.asList("root"), tracker.getUnfinishedLeafTasks());

    tracker.updateProgress(AllocationTree.child2, 0);
    Assert.assertEquals(Arrays.asList("child2"), tracker.getUnfinishedLeafTasks());

    tracker.updateProgress(AllocationTree.child1, 0);
    Assert.assertEquals(Arrays.asList("child2", "child1"), tracker.getUnfinishedLeafTasks());

    tracker.updateProgress(AllocationTree.child1Child, 0);
    Assert.assertEquals(Arrays.asList("child2", "child1Child"), tracker.getUnfinishedLeafTasks());

    tracker.updateProgress(AllocationTree.child1Child, 50);
    Assert.assertEquals(Arrays.asList("child2", "child1Child"), tracker.getUnfinishedLeafTasks());

    tracker.updateProgress(AllocationTree.child2, 100);
    Assert.assertEquals(Arrays.asList("child2", "child1Child"), tracker.getUnfinishedLeafTasks());

    tracker.updateProgress(AllocationTree.child1Child, 50);
    Assert.assertEquals(Arrays.asList("child2"), tracker.getUnfinishedLeafTasks());

    tracker.updateProgress(AllocationTree.child2, 100);
    Assert.assertEquals(Collections.emptyList(), tracker.getUnfinishedLeafTasks());
  }
Second child of the root node.
jib-core/src/test/java/com/google/cloud/tools/jib/event/progress/AllocationCompletionTrackerTest.java