### Question:
DocumentReference extends AbstractLocalizedEntityReference { @Override public String toString() { return TOSTRING_SERIALIZER.serialize(this); } DocumentReference(EntityReference reference); protected  DocumentReference(EntityReference reference, EntityReference oldReference, EntityReference newReference);  DocumentReference(EntityReference reference, Locale locale);  DocumentReference(String wikiName, String spaceName, String pageName);  DocumentReference(String wikiName, String spaceName, String pageName, Locale locale);  DocumentReference(String wikiName, String spaceName, String pageName, String language);  DocumentReference(String wikiName, List<String> spaceNames, String pageName);  DocumentReference(String wikiName, List<String> spaceNames, String pageName, Locale locale);  DocumentReference(String pageName, SpaceReference parent);  DocumentReference(LocalDocumentReference localDocumentReference, WikiReference wikiReference);  DocumentReference(String pageName, SpaceReference parent, Locale locale); @Unstable  DocumentReference(String pageName, EntityReference parent, Map<String, Serializable> parameters);  DocumentReference(EntityReference reference, EntityReference parent); @Transient WikiReference getWikiReference(); @Transient DocumentReference setWikiReference(WikiReference wikiReference); @Transient SpaceReference getLastSpaceReference(); @Transient List<SpaceReference> getSpaceReferences(); @Override DocumentReference replaceParent(EntityReference oldParent, EntityReference newParent); @Override DocumentReference replaceParent(EntityReference newParent); @Deprecated LocalDocumentReference getLocaleDocumentReference(); LocalDocumentReference getLocalDocumentReference(); @Override String toString(); static final Type TYPE_PROVIDER; }### Answer:
@Test public void testToString() { DocumentReference reference1 = new DocumentReference("wiki", "space", "page"); assertEquals("wiki:space.page", reference1.toString()); DocumentReference reference2 = new DocumentReference("wiki", "space", "page", Locale.FRANCE); assertEquals("wiki:space.page(fr_FR)", reference2.toString()); DocumentReference reference3 = new DocumentReference("wiki", "space", "page", "en"); assertEquals("wiki:space.page(en)", reference3.toString()); }
@Test public void testCreateDocumentReferenceFromLocalDocumentReference() { assertEquals("wiki:space.page", new DocumentReference(new LocalDocumentReference("space", "page"), new WikiReference("wiki")).toString()); }