> test ATTACH
ATTACH:https://example.com/foo.pdf
> convert
"links": {
  "245708bf-8e07-5d3b-a5da-2974a63c3b91": {
    "@type": "Link",
    "href": "https://example.com/foo.pdf"
  }
},
"iCalComponent": {
    "convertedProperties": {
        "links/245708bf-8e07-5d3b-a5da-2974a63c3b91/href": {
        "name": "attach"
        }
    },
    "name": "vevent"
}

> test ATTACH with FMTTYPE
ATTACH;ENCODING=BASE64;VALUE=BINARY;FMTTYPE=image/png:iVBORw
 0KGgoAAAANSUhEUgAAAAEAAAABAQAAAAA3bvkkAAAAAmJLR0QAAd2KE6QAA
 AAKSURBVAjXY2gAAACCAIHdQ2r0AAAAAElFTkSuQmCC
> convert
"links": {
  "5cfd5bea-64f1-5bae-846b-d958abb5411e": {
    "@type": "Link",
    "href": "data:base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABAQAAAAA3bvkkAAAAAmJLR0QAAd2KE6QAAAAKSURBVAjXY2gAAACCAIHdQ2r0AAAAAElFTkSuQmCC",
    "contentType": "image/png"
  } 
},
"iCalComponent": {
    "convertedProperties": {
        "links/5cfd5bea-64f1-5bae-846b-d958abb5411e/href": {
        "name": "attach",
        "parameters": {
            "value": "BINARY"
        }
        }
    },
    "name": "vevent"
}

> test IMAGE
IMAGE;FMTTYPE=image/png;DISPLAY=BADGE,THUMBNAIL;LABEL="An image":
 https://example.com/images/party.png
> convert
"links": {
  "2c42ac17-1eaf-5a75-a216-aef848785d79": {
    "@type": "Link",
    "href": "https://example.com/images/party.png",
    "display": {
      "badge": true,
      "thumbnail": true
    },
    "contentType": "image/png",
    "title": "An image"
  }
},
"iCalComponent": {
        "convertedProperties": {
          "links/2c42ac17-1eaf-5a75-a216-aef848785d79/href": {
            "name": "image"
          }
        },
        "name": "vevent"
}

> test LINK
LINK;LINKREL=preview;LABEL=Venue:
 https://example.com/events
> convert
"links": {
  "63023b12-fcf4-53fa-841d-8c1684b9f80b": {
    "@type": "Link",
    "href": "https://example.com/events",
    "title": "Venue",
    "rel": "preview"
  }
},
"iCalComponent": {
        "convertedProperties": {
          "links/63023b12-fcf4-53fa-841d-8c1684b9f80b/href": {
            "name": "link"
          }
        },
        "name": "vevent"
}

> test ATTACH with JSPROP
ATTACH;JSID=mylink1:https://www.rfc-editor.org/rfc/rfc8984.html
JSPROP;JSPTR="links/mylink1/example.com:foo":"bar"
> convert
"links": {
  "mylink1": {
    "@type": "Link",
    "href": "https://www.rfc-editor.org/rfc/rfc8984.html",
    "example.com:foo": "bar"
  }
},
"iCalComponent": {
        "convertedProperties": {
          "links/mylink1/href": {
            "name": "attach"
          }
        },
        "name": "vevent"
}

> test LINK, ATTACH and IMAGE together
LINK;LINKREL=preview;LABEL=Venue:
 https://example.com/events
ATTACH:https://example.com/foo.pdf
IMAGE;FMTTYPE=image/png;DISPLAY=BADGE,THUMBNAIL;LABEL="An image":
 https://example.com/images/party.png
> convert
{
  "@type": "Group",
  "entries": [
    {
      "@type": "Event",
      "iCalComponent": {
        "convertedProperties": {
          "links/245708bf-8e07-5d3b-a5da-2974a63c3b91/href": {
            "name": "attach"
          },
          "links/2c42ac17-1eaf-5a75-a216-aef848785d79/href": {
            "name": "image"
          },
          "links/63023b12-fcf4-53fa-841d-8c1684b9f80b/href": {
            "name": "link"
          }
        },
        "name": "vevent"
      },
      "links": {
        "245708bf-8e07-5d3b-a5da-2974a63c3b91": {
          "@type": "Link",
          "href": "https://example.com/foo.pdf"
        },
        "2c42ac17-1eaf-5a75-a216-aef848785d79": {
          "@type": "Link",
          "contentType": "image/png",
          "display": {
            "badge": true,
            "thumbnail": true
          },
          "href": "https://example.com/images/party.png",
          "title": "An image"
        },
        "63023b12-fcf4-53fa-841d-8c1684b9f80b": {
          "@type": "Link",
          "href": "https://example.com/events",
          "rel": "preview",
          "title": "Venue"
        }
      }
    }
  ]
}
