@Test
public void testResolveAndSerializeObjectReference()
{

    EntityReference reference = resolver.resolve("wiki:space.page^Object", EntityType.OBJECT);
    Assert.assertEquals("wiki:space.page^Object", serializer.serialize(reference));
    // default values
    reference = resolver.resolve("", EntityType.OBJECT);
    Assert.assertEquals("xwiki:XWiki.WebHome^Object", serializer.serialize(reference));
    // property reference with no object
    reference = resolver.resolve("wiki:space.page.property", EntityType.OBJECT);
    Assert.assertEquals("xwiki:XWiki.WebHome^wiki:space.page.property", serializer.serialize(reference));
    // test escaping character
    reference = resolver.resolve("wiki:space.page^Obje\\^ct", EntityType.OBJECT);
    Assert.assertEquals("wiki:space.page^Obje\\^ct", serializer.serialize(reference));
    reference = resolver.resolve("wiki:spa^ce.page^Obje\\^ct", EntityType.OBJECT);
    Assert.assertEquals("wiki:spa^ce.page^Obje\\^ct", serializer.serialize(reference));
    reference = resolver.resolve(":.\\^@", EntityType.OBJECT);
    Assert.assertEquals("xwiki:XWiki.WebHome^:.\\^@", serializer.serialize(reference));
}