@SuppressWarnings("checkstyle:magicnumber")
    public static long idFromString(String str) {
        if (str == null || !ID_PATTERN.matcher(str).matches()) {
            return -1;
        }
        str = StringUtil.removeCharacter(str, '-');
        return Long.parseUnsignedLong(str, 16);
    }
@Test
    public void when_idFromString() {
        assertEquals(0, idFromString("0000-0000-0000-0000"));
        assertEquals(1, idFromString("0000-0000-0000-0001"));
        assertEquals(Long.MAX_VALUE, idFromString("7fff-ffff-ffff-ffff"));
        assertEquals(Long.MIN_VALUE, idFromString("8000-0000-0000-0000"));
        assertEquals(-1, idFromString("ffff-ffff-ffff-ffff"));
        assertEquals(1234567890123456789L, idFromString("1122-10f4-7de9-8115"));
        assertEquals(-1234567890123456789L, idFromString("eedd-ef0b-8216-7eeb"));
    }