Uid implements Serializable { @Override @Nonnull public String toString() { return uuid; } 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 testCreate() { LOG.info("testCreate"); final int size = 100; final Map<String, Boolean> map = new HashMap<>(size); for (int i = 0; i < size; ++i) { final Uid<?> id = new Uid(); LOG.info("UUID = {}", id); Assert.assertNull(map.put(id.toString(), true)); } Assert.assertTrue(true); }
@Test public void testToString() { LOG.info("testToString"); final Uid<Object> x = new Uid<>(); try { LOG.info("UUID = {}", x.toString()); } catch (final Exception ignored) { Assert.fail(); } }