Debug { public static String toMemorableString(long num) { StringBuilder memorable = new StringBuilder(); long hashNum = Math.abs(num); for (; ; ) { int chunk = (int) (hashNum & 0xf); memorable.append(CONSONANTS[chunk]); hashNum >>= 4; if (hashNum == 0) { break; } chunk = (int) (hashNum & 7); memorable.append(VOWELS[chunk]); hashNum >>= 3; if (hashNum == 0) { break; } } return memorable.toString(); }  static String toMemorableString(long num); static String objectId(Object o); static String abbreviatedName(Class<?> c); static String shortName(Class<?> c);  }
@Test public void testMemorableNumber() { assertEquals("badodyre", Debug.toMemorableString(56385664)); }
@Test public void testMemorableWithNegativeNumber() { assertEquals("d", Debug.toMemorableString(-1)); }
@Test public void testMemorableWithZero() { assertEquals("b", Debug.toMemorableString(0)); }