### Question:
XURI implements Comparable { @Override public final int compareTo(Object o) { return toString().compareTo(o.toString()); } XURI(String inputBaseURI, String type, String id);  XURI(String uri); final String getUri(); final String getType(); final EntityType getTypeAsEntityType(); final String getId(); final String getPath(); final Resource getAsResource(); @Override final String toString(); @Override final boolean equals(Object o); @Override final int hashCode(); @Override final int compareTo(Object o);  }### Answer:
@Test public void compareTo() throws Exception { String uri1 = BaseURI.work() + "w5434123599"; String uri2 = BaseURI.work() + "w0909090909"; XURI xuri1 = new XURI(uri1); XURI xuri2 = new XURI(uri2); assertEquals(0, xuri1.compareTo(new XURI(uri1))); assertEquals(FIVE, xuri1.compareTo(xuri2)); }