### Question:
Longs { public static String toString(long l) { if (l == 0) { return "0"; } int count = 2; long j = l; boolean negative = l < 0; if (!negative) { count = 1; j = -l; } while ((l /= 10) != 0) { count++; } char[] buffer = new char[count]; do { int ch = 0 - (int) (j % 10); ch += '0'; buffer[--count] = (char) ch; } while ((j /= 10) != 0); if (negative) { buffer[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_toStringJ2() { assertEquals("Returned incorrect String", "89000000005", Longs.toString(89000000005L)); assertEquals("Returned incorrect String", "-9223372036854775808", Longs.toString(Longs.MIN_VALUE)); assertEquals("Returned incorrect String", "9223372036854775807", Longs.toString(Longs.MAX_VALUE)); }
@Test public void test_toStringJI() { assertEquals("Returned incorrect dec string", "100000000", Longs.toString(100000000L)); assertEquals("Returned incorrect min string", "-9223372036854775808", Longs.toString(0x8000000000000000L)); assertEquals("Returned incorrect max string", "9223372036854775807", Longs.toString(0x7fffffffffffffffL)); }
@Test public void test_toStringJ() { assertEquals("-1", Longs.toString(-1)); assertEquals("0", Longs.toString(0)); assertEquals("1", Longs.toString(1)); assertEquals("-1", Longs.toString(0xFFFFFFFF)); }