@Test public void getDocumentFromWikiId() throws Exception { DocumentReference docRef = new DocumentReference("xwiki", XWiki.SYSTEM_SPACE, "XWikiServerWikiid1"); XWikiDocument document = mock(XWikiDocument.class); when(xwiki.getDocument(eq(docRef), any(XWikiContext.class))).thenReturn(document); XWikiDocument returnedDocument = this.mocker.getComponentUnderTest().getDocumentFromWikiId("wikiid1"); assertEquals(returnedDocument, document); }
@Override public XWikiDocument getDocumentFromWikiId(String wikiId) throws WikiManagerException { return getDocument(getDocumentReferenceFromId(wikiId)); }
DefaultWikiDescriptorDocumentHelper implements WikiDescriptorDocumentHelper { @Override public XWikiDocument getDocumentFromWikiId(String wikiId) throws WikiManagerException { return getDocument(getDocumentReferenceFromId(wikiId)); } }
DefaultWikiDescriptorDocumentHelper implements WikiDescriptorDocumentHelper { @Override public XWikiDocument getDocumentFromWikiId(String wikiId) throws WikiManagerException { return getDocument(getDocumentReferenceFromId(wikiId)); }  }
DefaultWikiDescriptorDocumentHelper implements WikiDescriptorDocumentHelper { @Override public XWikiDocument getDocumentFromWikiId(String wikiId) throws WikiManagerException { return getDocument(getDocumentReferenceFromId(wikiId)); }  @Override DocumentReference getDocumentReferenceFromId(String wikiId); @Override String getWikiIdFromDocumentReference(DocumentReference descriptorDocumentReference); @Override String getWikiIdFromDocumentFullname(String descriptorDocumentFullname); @Override XWikiDocument getDocumentFromWikiId(String wikiId); @Override DocumentReference findXWikiServerClassDocumentReference(String wikiAlias); @Override XWikiDocument findXWikiServerClassDocument(String wikiAlias); @Override List<XWikiDocument> getAllXWikiServerClassDocument(); @Override List<String> getAllXWikiServerClassDocumentNames(); }
DefaultWikiDescriptorDocumentHelper implements WikiDescriptorDocumentHelper { @Override public XWikiDocument getDocumentFromWikiId(String wikiId) throws WikiManagerException { return getDocument(getDocumentReferenceFromId(wikiId)); }  @Override DocumentReference getDocumentReferenceFromId(String wikiId); @Override String getWikiIdFromDocumentReference(DocumentReference descriptorDocumentReference); @Override String getWikiIdFromDocumentFullname(String descriptorDocumentFullname); @Override XWikiDocument getDocumentFromWikiId(String wikiId); @Override DocumentReference findXWikiServerClassDocumentReference(String wikiAlias); @Override XWikiDocument findXWikiServerClassDocument(String wikiAlias); @Override List<XWikiDocument> getAllXWikiServerClassDocument(); @Override List<String> getAllXWikiServerClassDocumentNames();  }