@Test void testConvertToString() { AttachmentReference attachmentReference = new AttachmentReference("file.txt", new DocumentReference("wiki", "space", "page")); Mockito.when(this.mockSerialier.serialize(attachmentReference)).thenReturn("wiki:space.page@file.txt"); assertEquals("wiki:space.page@file.txt", this.converterManager.convert(String.class, attachmentReference)); attachmentReference = new AttachmentReference("file.txt", new DocumentReference("currentwiki", "space", "page")); Mockito.when(this.mockSerialier.serialize(attachmentReference)).thenReturn("space.page@file.txt"); assertEquals("space.page@file.txt", this.converterManager.convert(String.class, attachmentReference)); }
@Override protected String convertToString(AttachmentReference value) { if (value == null) { return null; } return this.serializer.serialize(value); }
AttachmentReferenceConverter extends AbstractConverter<AttachmentReference> { @Override protected String convertToString(AttachmentReference value) { if (value == null) { return null; } return this.serializer.serialize(value); } }
AttachmentReferenceConverter extends AbstractConverter<AttachmentReference> { @Override protected String convertToString(AttachmentReference value) { if (value == null) { return null; } return this.serializer.serialize(value); }  }
AttachmentReferenceConverter extends AbstractConverter<AttachmentReference> { @Override protected String convertToString(AttachmentReference value) { if (value == null) { return null; } return this.serializer.serialize(value); }   }
AttachmentReferenceConverter extends AbstractConverter<AttachmentReference> { @Override protected String convertToString(AttachmentReference value) { if (value == null) { return null; } return this.serializer.serialize(value); }    }