@Test
public void testClone()
{

    EntityReference reference = new EntityReference("page", EntityType.DOCUMENT,
        new EntityReference("space", EntityType.SPACE,
            new EntityReference("wiki", EntityType.WIKI)));
    EntityReference clonedReference = reference.clone();
    Assert.assertNotSame(reference, clonedReference);
    Assert.assertNotSame(reference.getParent(), clonedReference.getParent());
    Assert.assertNotSame(reference.getParent().getParent(), clonedReference.getParent().getParent());
    Assert.assertEquals(reference, clonedReference);
}