HeroCard { public Attachment toAttachment() { return new Attachment() { { setContent(HeroCard.this); setContentType(CONTENTTYPE); } }; }  String getTitle(); void setTitle(String withTitle); String getSubtitle(); void setSubtitle(String withSubtitle); String getText(); void setText(String withText); List<CardImage> getImages(); void setImages(List<CardImage> withImages); List<CardAction> getButtons(); void setButtons(List<CardAction> withButtons); CardAction getTap(); void setTap(CardAction withTap); Attachment toAttachment(); @JsonIgnore
    static final String CONTENTTYPE; }
@Test public void testToAttachment() { Attachment attachment = card.toAttachment(); Assert.assertNotNull(attachment); Assert.assertEquals("application/vnd.microsoft.card.hero", attachment.getContentType()); }