final DeploymentStatusFoo stage1 = new DeploymentStatusFoo();
final DeploymentStatusFoo stage2 = new DeploymentStatusFoo();
final DeploymentStatusFoo stage1_1 = new DeploymentStatusFoo();
final DeploymentStatusFoo stage2_1 = new DeploymentStatusFoo();
final DeploymentStatusImpl root = createDeploymentStatus( "root" );
assert( stage1.getParent() == null );
root.addSubStage( stage1 );
assert( stage1.getParent() == root );
root.addSubStage( stage2 );
assert( stage2.getParent() == root );
stage1.addSubStage( stage1_1 );
assert( stage1_1.getParent() == stage1 );
stage2.addSubStage( stage2_1 );
assert( stage2_1.getParent() == stage2 );
final List<DeploymentStatus> subStages = root.getSubStagesList();
assert( subStages.get(0) == stage1 );
assert( subStages.get(1) == stage2 );
}