@Test
public void testResolveObjectPropertyReferenceWhenTypeIsDocument()
{

    EntityReference reference =
        resolver.resolve(new EntityReference("page", EntityType.DOCUMENT, new EntityReference("space",
            EntityType.SPACE, new EntityReference("wiki", EntityType.WIKI))), EntityType.OBJECT_PROPERTY);
    Assert.assertEquals(EntityType.OBJECT_PROPERTY, reference.getType());
    Assert.assertEquals("defproperty", reference.getName());
    Assert.assertEquals(EntityType.OBJECT, reference.getParent().getType());
    Assert.assertEquals("defobject", reference.getParent().getName());
    Assert.assertEquals(EntityType.DOCUMENT, reference.getParent().getParent().getType());
    Assert.assertEquals("page", reference.getParent().getParent().getName());
    Assert.assertEquals(EntityType.SPACE, reference.getParent().getParent().getParent().getType());
    Assert.assertEquals("space", reference.getParent().getParent().getParent().getName());
    Assert.assertEquals(EntityType.WIKI, reference.getParent().getParent().getParent().getParent().getType());
    Assert.assertEquals("wiki", reference.getParent().getParent().getParent().getParent().getName());
}