Util { @SuppressWarnings("checkstyle:magicnumber") public static String idToString(long id) { char[] buf = Arrays.copyOf(ID_TEMPLATE, ID_TEMPLATE.length); String hexStr = Long.toHexString(id); for (int i = hexStr.length() - 1, j = 18; i >= 0; i--, j--) { buf[j] = hexStr.charAt(i); if (j == 15 || j == 10 || j == 5) { j--; } } return new String(buf); } private  Util(); static Entry<K, V> entry(K k, V v); static PredicateEx<EventJournalMapEvent<K, V>> mapPutEvents(); static PredicateEx<EventJournalCacheEvent<K, V>> cachePutEvents(); static FunctionEx<EventJournalMapEvent<K, V>, Entry<K, V>> mapEventToEntry(); static FunctionEx<EventJournalMapEvent<K, V>, V> mapEventNewValue(); static FunctionEx<EventJournalCacheEvent<K, V>, Entry<K, V>> cacheEventToEntry(); static FunctionEx<EventJournalCacheEvent<K, V>, V> cacheEventNewValue(); @SuppressWarnings("checkstyle:magicnumber") static String idToString(long id); @SuppressWarnings("checkstyle:magicnumber") static long idFromString(String str); static Path getFilePathOfClasspathResource(String resourcePath);  }
@Test public void when_idToString() { assertEquals("0000-0000-0000-0000", idToString(0)); assertEquals("0000-0000-0000-0001", idToString(1)); assertEquals("7fff-ffff-ffff-ffff", idToString(Long.MAX_VALUE)); assertEquals("8000-0000-0000-0000", idToString(Long.MIN_VALUE)); assertEquals("ffff-ffff-ffff-ffff", idToString(-1)); assertEquals("1122-10f4-7de9-8115", idToString(1234567890123456789L)); assertEquals("eedd-ef0b-8216-7eeb", idToString(-1234567890123456789L)); }