### Question:
Attachment implements Transferable { public MultivaluedMap<String, String> getHeaders() { return new MetadataMap<String, String>(headers, false, true); } Attachment(org.apache.cxf.message.Attachment a,
                      Providers providers);  Attachment(String id, DataHandler dh, MultivaluedMap<String, String> headers);  Attachment(String id, DataSource ds, MultivaluedMap<String, String> headers);  Attachment(MultivaluedMap<String, String> headers, Object object);  Attachment(InputStream is, MultivaluedMap<String, String> headers);  Attachment(String mediaType, Object object);  Attachment(String id, String mediaType, Object object);  Attachment(String id, InputStream is, ContentDisposition cd);  Attachment(MultivaluedMap<String, String> headers, DataHandler handler, Object object); ContentDisposition getContentDisposition(); String getContentId(); MediaType getContentType(); DataHandler getDataHandler(); void setDataHandler(DataHandler dataHandler); Object getObject(); T getObject(Class<T> cls); String getHeader(String name); List<String> getHeaderAsList(String name); MultivaluedMap<String, String> getHeaders(); void transferTo(File destinationFile); @Override int hashCode(); @Override boolean equals(Object o);  }### Answer:
@Test public void testGetHeaders() { Attachment a = createAttachment("p1"); assertEquals("bar", a.getHeader("foo")); }