testDependencyTreeWithShuffle(new Bundle[]{e, d, c, b, a}, new Bundle[]{a, b, c, d, e});
}
public void testCircularReferenceId() throws Exception {
DependencyMockBundle A = new DependencyMockBundle("A");
DependencyMockBundle B = new DependencyMockBundle("B");
DependencyMockBundle C = new DependencyMockBundle("C");
DependencyMockBundle D = new DependencyMockBundle("D");
DependencyMockBundle E = new DependencyMockBundle("E");
// Sets dependency A -> B -> C -> D -> E -> A
// A has lowest id so gets shutdown last (started first).
A.setDependentOn(new Bundle[]{E}, 0, 0);
B.setDependentOn(new Bundle[]{A}, 0, 1);
C.setDependentOn(new Bundle[]{B}, 0, 2);
D.setDependentOn(new Bundle[]{C}, 0, 3);
E.setDependentOn(new Bundle[]{D}, 0, 4);
testDependencyTreeWithShuffle(new Bundle[]{E, D, C, B, A}, new Bundle[]{E, D, C, B, A});
}