public void testGetType() throws URISyntaxException {
final XLink link = new XLink();
int hashCode = link.hashCode();
assertFalse(hashCode == 0);
assertNull(link.getType());
assertEquals(XLink.Type.TITLE, link.getType());
assertEquals("XLink[type=\"title\"]", link.toString());
assertFalse("Hash code should have changed.", hashCode == (hashCode = link.hashCode()));
assertFalse("Hash code can not be zero.", hashCode == 0);
assertEquals(XLink.Type.EXTENDED, link.getType());
assertEquals("XLink[type=\"extended\", role=\"org:apache:sis:role\"]", link.toString());
assertFalse("Hash code should have changed.", hashCode == (hashCode = link.hashCode()));
assertFalse("Hash code can not be zero.", hashCode == 0);
assertEquals(XLink.Type.EXTENDED, link.getType());
assertEquals("XLink[type=\"extended\", role=\"org:apache:sis:role\", title=\"Some title\"]", link.toString());
assertFalse("Hash code should have changed.", hashCode == (hashCode = link.hashCode()));
assertFalse("Hash code can not be zero.", hashCode == 0);
assertEquals(XLink.Type.RESOURCE, link.getType());
assertEquals("XLink[type=\"resource\", role=\"org:apache:sis:role\", title=\"Some title\", label=\"SomeLabel\"]", link.toString());
assertFalse("Hash code should have changed.", hashCode == (hashCode = link.hashCode()));
assertFalse("Hash code can not be zero.", hashCode == 0);
assertEquals(XLink.Type.LOCATOR, link.getType());
assertEquals("XLink[type=\"locator\", href=\"org:apache:sis:href\", role=\"org:apache:sis:role\", title=\"Some title\", label=\"SomeLabel\"]", link.toString());
assertFalse("Hash code should have changed.", hashCode == (hashCode = link.hashCode()));