@Test
public void testResolveAndSerializePropertyReference()
{

    EntityReference reference = resolver.resolve("wiki:space.page^xwiki.class[0].prop", EntityType.OBJECT_PROPERTY);
    Assert.assertEquals("wiki:space.page^xwiki.class[0].prop", serializer.serialize(reference));
    // default values
    reference = resolver.resolve("", EntityType.OBJECT_PROPERTY);
    Assert.assertEquals("xwiki:XWiki.WebHome^Object.Property", serializer.serialize(reference));
    // using separators
    reference = resolver.resolve("space^page@attachment", EntityType.OBJECT_PROPERTY);
    Assert
        .assertEquals("xwiki:XWiki.WebHome^Object.space^page@attachment", serializer.serialize(reference));
    reference = resolver.resolve("wiki:space^object", EntityType.OBJECT_PROPERTY);
    Assert.assertEquals("xwiki:XWiki.WebHome^Object.wiki:space^object", serializer.serialize(reference));
    // test escaping character
    reference = resolver.resolve("wiki:space.page^xwiki.class[0].prop\\.erty", EntityType.OBJECT_PROPERTY);
    Assert.assertEquals("wiki:space.page^xwiki.class[0].prop\\.erty", serializer.serialize(reference));
    
    reference = resolver.resolve(":\\.^@", EntityType.OBJECT_PROPERTY);
    Assert.assertEquals("xwiki:XWiki.WebHome^Object.:\\.^@", serializer.serialize(reference));        
}