### Question:
HashUID extends UID { @SuppressWarnings("unchecked") public static HashUID parse(String s) { return parse(s, -1); } protected  HashUID(); protected  HashUID(final byte[] data, final Date time); protected  HashUID(final byte[] data, final Date time, final String... extras); protected  HashUID(final HashUID template, final String... extras); private  HashUID(final String optionalPrefix, int h1, int h2, int time, final String... extras); private  HashUID(final String optionalPrefix, int h1, int h2, int time); @SuppressWarnings({"unchecked", "rawtypes"}) static UIDBuilder<UID> builder(); @Override int compareTo(final UID uid); @Override boolean equals(Object other); String getBaseUid(); int getH0(); int getH1(); int getH2(); String getShardedPortion(); int getTime(); @Override int hashCode(); @SuppressWarnings({"unchecked", "rawtypes"}) static UIDBuilder<UID> newBuilder(final Date time); @SuppressWarnings("unchecked") static HashUID parse(String s); @SuppressWarnings("unchecked") static HashUID parse(String s, int maxExtraParts); @SuppressWarnings("unchecked") static HashUID parseBase(String s); void readFields(DataInput in); @Override String toString();  }### Answer:
@Test public void testParse() { UID a = new HashUID(data.getBytes(), (Date) null) {}; UID b = UID.parse(a.toString()); assertEquals(a, b); assertEquals(b, a); assertEquals(0, a.compareTo(b)); assertEquals(0, a.compare(a, b)); a = new HashUID(data.getBytes(), null, "blabla") {}; b = UID.parse(a.toString()); assertEquals(a, b); assertEquals(b, a); assertEquals(0, a.compareTo(b)); assertEquals(0, a.compare(a, b)); a = HashUID.parseBase(a.toString()); b = HashUID.parseBase(b.toString()); assertEquals(a, b); Exception exception = null; try { HashUID.parseBase("less_than_3_parts_makes_this_invalid"); } catch (IllegalArgumentException e) { exception = e; } assertNotNull(exception); }