long time = System.currentTimeMillis();
XRISubSegment subSegment;
subSegment = new XRI3SubSegment("*earth");
assertFalse(subSegment.hasGCS());
assertTrue(subSegment.hasLCS());
assertFalse(subSegment.isGlobal());
assertTrue(subSegment.isLocal());
assertTrue(subSegment.isReassignable());
assertFalse(subSegment.isPersistent());
assertEquals(subSegment.getLiteral(), "earth");
System.out.println(Long.toString(System.currentTimeMillis() - time) + " ms");
subSegment = new XRI3SubSegment("@free");
assertTrue(subSegment.hasGCS());
assertFalse(subSegment.hasLCS());
assertTrue(subSegment.isGlobal());
assertFalse(subSegment.isLocal());
assertTrue(subSegment.isReassignable());
assertFalse(subSegment.isPersistent());
assertEquals(subSegment.getLiteral(), "free");
System.out.println(Long.toString(System.currentTimeMillis() - time) + " ms");
subSegment = new XRI3SubSegment("+!16");
assertTrue(subSegment.hasGCS());
assertTrue(subSegment.hasLCS());
assertTrue(subSegment.isGlobal());
assertFalse(subSegment.isLocal());
assertFalse(subSegment.isReassignable());
assertTrue(subSegment.isPersistent());
assertEquals(subSegment.getLiteral(), "16");
System.out.println(Long.toString(System.currentTimeMillis() - time) + " ms");
subSegment = new XRI3SubSegment("!canonical");
assertFalse(subSegment.hasGCS());
assertTrue(subSegment.hasLCS());
assertFalse(subSegment.isGlobal());
assertTrue(subSegment.isLocal());
assertFalse(subSegment.isReassignable());
assertTrue(subSegment.isPersistent());
assertEquals(subSegment.getLiteral(), "canonical");
System.out.println(Long.toString(System.currentTimeMillis() - time) + " ms");
subSegment = new XRI3SubSegment("+(@free*earth*moon)");
assertEquals(subSegment.getGCS(), XRI3Constants.GCS_PLUS);
assertEquals(subSegment.getLCS(), null);
assertFalse(subSegment.hasLiteral());
assertTrue(subSegment.hasXRef());
assertEquals(subSegment.getXRef(), "(@free*earth*moon)");
assertTrue(subSegment.getXRef().hasXRIReference());
assertFalse(subSegment.getXRef().hasIRI());
assertEquals(subSegment.getXRef().getXRIReference(), "@free*earth*moon");
assertEquals(subSegment.getXRef().getXRIReference().getAuthority().getNumSubSegments(), 3);
System.out.println(Long.toString(System.currentTimeMillis() - time) + " ms");
subSegment = new XRI3SubSegment("+(http://schemas.xmlsoap.org)");
assertEquals(subSegment.getGCS(), XRI3Constants.GCS_PLUS);
assertEquals(subSegment.getLCS(), null);
assertFalse(subSegment.hasLiteral());
assertTrue(subSegment.hasXRef());
assertEquals(subSegment.getXRef(), "(http://schemas.xmlsoap.org)");