### Question:
XWikiDocumentConverter extends AbstractConverter<XWikiDocument> { @Override protected String convertToString(XWikiDocument value) { return this.serializer.serialize(value.getDocumentReference()); }  @Override G convert(Type targetType, Object sourceValue); @Override XWikiDocument convertToType(Type targetType, Object sourceValue);  }### Answer:
@Test void convertToString() { when(serializer.serialize(xWikiDocument.getDocumentReference())).thenReturn("reference"); assertSame("reference", documentConverter.convert(String.class, xWikiDocument)); }