### Question:
UUIDGenerator { public static String nextString(int type) { byte[] bytes = next(type); try { return new String(bytes, "ISO-8859-1"); } catch (Exception e) { return new String(bytes); } }  static byte[] next(int type); static byte[] createType1(); static String nextString(int type); static String nextHex(int type); static final int TYPE1; static final int TYPE4; }### Answer:
@Test public void testUniqueString() { Set seen = new HashSet(); for (int i = 0; i < 10000; i++) assertTrue(seen.add( UUIDGenerator.nextString(UUIDGenerator.TYPE1))); }
@Test public void testUniqueType4String() { Set seen = new HashSet(); for (int i = 0; i < 10000; i++) assertTrue(seen.add( UUIDGenerator.nextString(UUIDGenerator.TYPE4))); }