@Test
public void testResolveSpaceReferenceWhenTypeIsDocument()
{

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