### Question:
CurrentMixedStringDocumentReferenceResolver extends AbstractStringEntityReferenceResolver implements
    DocumentReferenceResolver<String> { @Override public DocumentReference resolve(String documentReferenceRepresentation, Object... parameters) { return new DocumentReference(resolve(documentReferenceRepresentation, EntityType.DOCUMENT, parameters)); }  @Override DocumentReference resolve(String documentReferenceRepresentation, Object... parameters);  }### Answer:
@Test public void testResolveDocumentReferenceWhenContextDocument() throws Exception { getContext().setDoc(new XWikiDocument(new DocumentReference("not used", CURRENT_SPACE, "notused"))); getContext().setWikiId("currentwiki"); EntityReference reference = this.resolver.resolve("", EntityType.DOCUMENT); Assert.assertEquals("currentwiki", reference.extractReference(EntityType.WIKI).getName()); Assert.assertEquals(CURRENT_SPACE, reference.extractReference(EntityType.SPACE).getName()); Assert.assertEquals("WebHome", reference.getName()); }
@Test public void testResolveDocumentReferenceForDefaultWikiWhenNoContextDocument() throws Exception { getContext().setWikiId("currentwiki"); EntityReference reference = this.resolver.resolve("space.page", EntityType.DOCUMENT); Assert.assertEquals("currentwiki", reference.extractReference(EntityType.WIKI).getName()); Assert.assertEquals("space", reference.extractReference(EntityType.SPACE).getName()); Assert.assertEquals("page", reference.getName()); }