NumberUtils { public static int compareLong(long o1, long o2) { if (o1 < o2) { return -1; } else if (o1 == o2) { return 0; } else { return 1; } }  static int compareLong(long o1, long o2);  }
@Test public void testCompareLong() { Assert.assertEquals(0, NumberUtils.compareLong(0L, 0L)); Assert.assertEquals(1, NumberUtils.compareLong(9L, 0L)); Assert.assertEquals(-1, NumberUtils.compareLong(0L, 9L)); Assert.assertEquals(-1, NumberUtils.compareLong(-9L, 0L)); Assert.assertEquals(1, NumberUtils.compareLong(0L, -9L)); }