IdGenerator { public String generate() { return hexDump(ByteBuffer.allocate(16).putLong(hi.get()).putLong(low.getAndIncrement()).array()); } IdGenerator(); String generate(); String generateGuid();  }
@Test void generate() { IdGenerator idGenerator = new IdGenerator(); IdGenerator idGenerator2 = new IdGenerator(); String id1 = idGenerator.generate(); Assert.assertNotEquals(id1, idGenerator.generate()); Assert.assertNotEquals(id1, idGenerator2.generate()); }