Attachment attachment = (Attachment) src; if (attachment.hasData()) { byte[] encodedData = Base64.encodeBase64(attachment.getData()); try { properties.add(Attachment.DATA, new JsonPrimitive(
public void testConstructorWithCaptionAndData() { Attachment attachment = new Attachment(CAPTION, DATA); assertEquals(ElementType.ATTACHMENT, attachment.getType()); assertEquals(CAPTION, attachment.getCaption()); assertEquals(DATA, attachment.getData()); }
public void testConstructorWithCaptionAndData() { Attachment attachment = new Attachment(CAPTION, DATA); assertEquals(ElementType.ATTACHMENT, attachment.getType()); assertEquals(CAPTION, attachment.getCaption()); assertEquals(DATA, attachment.getData()); }