@Test
public void testResolveDocumentReferenceWhenInvalidReference()
{

    try {
        resolver.resolve(new EntityReference("page", EntityType.DOCUMENT,
            new EntityReference("filename", EntityType.ATTACHMENT)), EntityType.DOCUMENT);
        Assert.fail("Should have thrown an exception here");
    } catch (InvalidEntityReferenceException expected) {
        Assert.assertEquals("Invalid reference [name = [page], type = [DOCUMENT], parent = [name = [filename], "
            + "type = [ATTACHMENT], parent = [null]]]", expected.getMessage());            
    }
}