### Question:
Longs { public static String toHexString(long l) { int count = 1; long j = l; if (l < 0) { count = 16; } else { while ((j >>= 4) != 0) { count++; } } char[] buffer = new char[count]; do { int t = (int) (l & 15); if (t > 9) { t = t - 10 + 'a'; } else { t += '0'; } buffer[--count] = (char) t; l >>= 4; } while (count > 0); return new String(buffer); }  static long decode(String string); static long parseLong(String string); static long parseLong(String string, int radix); static String toBinaryString(long l); static String toHexString(long l); static String toString(long l); static long highestOneBit(long lng); static long lowestOneBit(long lng); static int numberOfLeadingZeros(long lng); static int numberOfTrailingZeros(long lng); static int bitCount(long lng); static long rotateLeft(long lng, int distance); static long rotateRight(long lng, int distance); static long reverseBytes(long lng); static long reverse(long lng); static final long MAX_VALUE; static final long MIN_VALUE; }### Answer:
@Test public void test_toHexStringJ() { assertEquals("Incorrect hex string returned", "54e0845", Longs.toHexString(89000005L)); assertEquals("Incorrect hex string returned", "8000000000000000", Longs.toHexString(Longs.MIN_VALUE)); assertEquals("Incorrect hex string returned", "7fffffffffffffff", Longs.toHexString(Longs.MAX_VALUE)); }