code: private MultipartBody createMultipartBody() throws Exception  {
          List<Attachment> atts = new LinkedList<Attachment>();
          atts.add(new Attachment("book1", "application/xml", new Book("JAXB", 1L)));
          atts.add(new Attachment("book2", "application/json", new Book("JSON", 2L)));
          
          atts.add(new Attachment("image", "application/octet-stream",
                                  getClass().getResourceAsStream("/java.jpg")));
          
          return new MultipartBody(atts, true);  
  
      }
docs: Creates MultipartBody. It contains 3 parts, "book1", "book2" and "image".
  These individual parts have their Content-Type set to application/xml,
  application/json and application/octet-stream
  
  MultipartBody will use the Content-Type value of the individual
  part to write its data by delegating to a matching JAX-RS MessageBodyWriter
  provider
  
  @return
  @throws Exception