/** * Constructs an attachment with data in bytes and caption. * * @param caption the caption of the attachment. * @param data the attachment data as bytes. */ public Attachment(String caption, byte[] data) { super(ElementType.ATTACHMENT); setCaption(caption); this.data = data; }
attachment.setCaption("new caption"); assertEquals("new caption", attachment.getCaption());
attachment.setCaption("new caption"); assertEquals("new caption", attachment.getCaption());