@Test
public void testResolver()
{

    try {
        DocumentReferenceResolver<String> resolver = getComponentManager().lookup(DocumentReferenceResolver.class, "user");
        DocumentReferenceResolver<String> defaultResolver = getComponentManager().lookup(DocumentReferenceResolver.class, "user");
        assertTrue(resolver.resolve("Bosse")                          .equals(defaultResolver.resolve("xwiki:XWiki.Bosse")));
        assertTrue(resolver.resolve("bossesSpace.Bosse")              .equals(defaultResolver.resolve("xwiki:bossesSpace.Bosse")));
        assertTrue(resolver.resolve("Bosse", "bossesWiki")            .equals(defaultResolver.resolve("bossesWiki:XWiki.Bosse")));
        assertTrue(resolver.resolve("bossesSpace.Bosse", "bossesWiki").equals(defaultResolver.resolve("bossesWiki:bossesSpace.Bosse")));
        assertTrue(resolver.resolve("bossesWiki:bossesSpace.Bosse")   .equals(defaultResolver.resolve("bossesWiki:bossesSpace.Bosse")));
    } catch(Exception e) {
        System.out.println("Caught exception: " + e);
        e.printStackTrace(System.out);
        assert false;
    }
}