@Test
public void testResolveAttachmentReferenceWhenMissingParentBetweenReferences()
{

    EntityReference reference = resolver.resolve(
        new EntityReference("filename", EntityType.ATTACHMENT, new EntityReference("wiki", EntityType.WIKI)),
        EntityType.ATTACHMENT);
    Assert.assertEquals("defpage", reference.getParent().getName());
    Assert.assertEquals(EntityType.DOCUMENT, reference.getParent().getType());
    Assert.assertEquals("defspace", reference.getParent().getParent().getName());
    Assert.assertEquals(EntityType.SPACE, reference.getParent().getParent().getType());
    Assert.assertEquals("wiki", reference.getParent().getParent().getParent().getName());
    Assert.assertEquals(EntityType.WIKI, reference.getParent().getParent().getParent().getType());
}