public static String getOrCreateUuid(@Nullable UUID uuid) {
    if (uuid != null) {
      return uuid.toString();
    }
    return UUID.randomUUID().toString();
  }
@Test
  public void testGetOrCreateUuid() {
    UUID expected = UUID.randomUUID();
    Assert.assertEquals(expected.toString(), IdHelper.getOrCreateUuid(expected));
  }