@Test void create() { Set<Object> set = new HashSet<>(); for (int i = 0; i < 10E6; i++) { String token = UniqueToken.create(); assertNotNull(token); assertFalse(set.contains(token)); set.add(token); } }
public static String create() { return Base64Utils.encodeToUrlSafeString(UUID.randomUUID().toString().getBytes()); }
UniqueToken { public static String create() { return Base64Utils.encodeToUrlSafeString(UUID.randomUUID().toString().getBytes()); } }
UniqueToken { public static String create() { return Base64Utils.encodeToUrlSafeString(UUID.randomUUID().toString().getBytes()); } private  UniqueToken(); }
UniqueToken { public static String create() { return Base64Utils.encodeToUrlSafeString(UUID.randomUUID().toString().getBytes()); } private  UniqueToken(); static String create(); }
UniqueToken { public static String create() { return Base64Utils.encodeToUrlSafeString(UUID.randomUUID().toString().getBytes()); } private  UniqueToken(); static String create();  }