/**
* Tests the clone() method.
*/
public void testClone() {
LifeLineElement cloned = (LifeLineElement) lifeline.clone();
assertNotSame(lifeline, cloned);
assertNotSame(lifeline.getModelElement(), cloned.getModelElement());
assertNotSame(lifeline.getMainCompartment(), cloned.getMainCompartment());
assertTrue(cloned == cloned.getMainCompartment().getParent());
assertEquals(1, cloned.getMainCompartment().getLabels().size());
Label label = cloned.getMainCompartment().getLabels().get(0);
assertTrue(cloned.getMainCompartment() == label.getParent());
assertTrue(cloned == label.getSource());
}