@Test
public void testResolveDocumentReferenceWhenMissingParents()
{

    EntityReference reference = resolver.resolve(new EntityReference("page", EntityType.DOCUMENT),
        EntityType.DOCUMENT);
    Assert.assertEquals("defspace", reference.getParent().getName());
    Assert.assertEquals(EntityType.SPACE, reference.getParent().getType());
    Assert.assertEquals("defwiki", reference.getParent().getParent().getName());
    Assert.assertEquals(EntityType.WIKI, reference.getParent().getParent().getType()); 
}