### Question:
ModelScriptService implements ScriptService { public SpaceReference createSpaceReference(String spaceName, WikiReference parent) { return new SpaceReference(spaceName, parent); }  DocumentReference createDocumentReference(String wiki, String space, String page); DocumentReference createDocumentReference(String wiki, List<String> spaces, String page); DocumentReference createDocumentReference(DocumentReference reference, Locale locale); DocumentReference createDocumentReference(String pageName, SpaceReference parent); DocumentReference createDocumentReference(String wiki, String space, String page, String hint); DocumentReference createDocumentReference(String wiki, List<String> spaces, String page, String hint); PageReference createPageReference(String wiki, String... pages); PageReference createPageReference(String wiki, List<String> pages, Locale locale); PageReference createPageReference(String wiki, List<String> pages, Locale locale, String hint); AttachmentReference createAttachmentReference(DocumentReference documentReference, String fileName); PageAttachmentReference createPageAttachmentReference(PageReference pageReference, String fileName); WikiReference createWikiReference(String wikiName); SpaceReference createSpaceReference(String spaceName, WikiReference parent); SpaceReference createSpaceReference(String spaceName, SpaceReference parent); SpaceReference createSpaceReference(List<String> spaces, WikiReference parent); EntityReference createEntityReference(String name, EntityType type); EntityReference createEntityReference(String name, EntityType type, EntityReference parent); SpaceReference resolveSpace(String stringRepresentation, Object... parameters); SpaceReference resolveSpace(String stringRepresentation, String hint, Object... parameters); DocumentReference resolveDocument(String stringRepresentation, Object... parameters); DocumentReference resolveDocument(String stringRepresentation, String hint, Object... parameters); PageReference resolvePage(String stringRepresentation, Object... parameters); PageReference resolvePage(String stringRepresentation, String hint, Object... parameters); AttachmentReference resolveAttachment(String stringRepresentation, Object... parameters); AttachmentReference resolveAttachment(String stringRepresentation, String hint, Object... parameters); PageAttachmentReference resolvePageAttachment(String stringRepresentation, Object... parameters); PageAttachmentReference resolvePageAttachment(String stringRepresentation, String hint, Object... parameters); ObjectReference resolveObject(String stringRepresentation, Object... parameters); ObjectReference resolveObject(String stringRepresentation, String hint, Object... parameters); PageObjectReference resolvePageObject(String stringRepresentation, Object... parameters); PageObjectReference resolvePageObject(String stringRepresentation, String hint, Object... parameters); ObjectPropertyReference resolveObjectProperty(String stringRepresentation, Object... parameters); ObjectPropertyReference resolveObjectProperty(String stringRepresentation, String hint, Object... parameters); PageObjectPropertyReference resolvePageObjectProperty(String stringRepresentation, Object... parameters); PageObjectPropertyReference resolvePageObjectProperty(String stringRepresentation, String hint,
        Object... parameters); ClassPropertyReference resolveClassProperty(String stringRepresentation, Object... parameters); ClassPropertyReference resolveClassProperty(String stringRepresentation, String hint, Object... parameters); PageClassPropertyReference resolvePageClassProperty(String stringRepresentation, Object... parameters); PageClassPropertyReference resolvePageClassProperty(String stringRepresentation, String hint,
        Object... parameters); String serialize(EntityReference reference, Object... parameters); String serialize(EntityReference reference, String hint, Object... parameters); @Deprecated String getEntityReferenceValue(EntityType type); @Deprecated String getEntityReferenceValue(EntityType type, String hint); EntityReference getEntityReference(EntityType type); EntityReference getEntityReference(EntityType type, String hint); EntityReferenceTree toTree(Iterable<? extends EntityReference> references); EntityReferenceTree toTree(EntityReference... references); String escape(String name, EntityType type);  }### Answer:
@Test public void createSpaceReference() { assertEquals(new SpaceReference("space", new WikiReference("wiki")), this.service.createSpaceReference("space", this.service.createWikiReference("wiki"))); SpaceReference spaceReference = new SpaceReference("C", new SpaceReference("B", new SpaceReference("A", new WikiReference("wiki")))); assertEquals(spaceReference, this.service.createSpaceReference(Arrays.asList("A", "B", "C"), this.service.createWikiReference("wiki"))); assertEquals(spaceReference, this.service.createSpaceReference(spaceReference.getName(), (SpaceReference) spaceReference.getParent())); }