Uid implements Serializable { @Nonnull public static <T> Uid<T> fromString(@Nonnull final String id) { assert id != null; return new Uid<>(id); } Uid();  Uid(@Nonnull final String uuid); private  Uid(@Nonnull final UUID uuid); static boolean isValid(@Nullable final String id); @Nonnull static Uid<T> fromString(@Nonnull final String id); @Nonnull static Uid<T> fromHexString(@Nonnull final String id); @Nonnull String toHexString(); @SuppressWarnings({"unchecked", "UnusedParameters"}) @Nonnull Uid<T> as(@Nonnull final Class<T> ignored); boolean matchesFromString(@Nonnull final String uid); @Override boolean equals(@Nullable final Object obj); @Override int hashCode(); @Override @Nonnull String toString();  }
@Test public void testFromString() { LOG.info("testFromString"); final Uid<Object> a = Uid.fromString("d32b6789-bfbb-4194-87f3-72ce34609902"); final String s = "d32b6789-bfbb-4194-87f3-72ce34609902"; final Uid<Object> b = Uid.fromString(s); Assert.assertEquals(a, b); }