DocumentReference extends EntityReference { public WikiReference getWikiReference() { return (WikiReference) extractReference(EntityType.WIKI); } DocumentReference(EntityReference reference);  DocumentReference(String wikiName, String spaceName, String pageName);  DocumentReference(String wikiName, List<String> spaceNames, String pageName);  DocumentReference(String pageName, SpaceReference parent); @Override void setParent(EntityReference parent); @Override void setType(EntityType type); WikiReference getWikiReference(); void setWikiReference(WikiReference newWikiReference); SpaceReference getLastSpaceReference(); List<SpaceReference> getSpaceReferences();  }
@Test public void testGetWikiReference() { DocumentReference reference = new DocumentReference("wiki", "space", "page"); Assert.assertEquals(new WikiReference("wiki"), reference.getWikiReference()); }