CmpUtil { public static int compare(int one, int two) { return Integer.compare(one, two); }  static int compare(int one, int two); static int compare(long one, long two); static int compare(double one, double two); static int compare(float one, float two); static int compare(String one, String two); static int compare(byte[] one, byte[] two); static boolean equals(byte[] one, byte[] two); static int hash(byte b); static int hash(int i); static int hash(long l); static int hash(double d); static int hash(float f); static int hash(String s); static int hash(byte[] bytes); static final double epsilon; static final double neg_epsilon; }
@Test public void testUnicodeBug() { String bb = ByteUtil.toString(new byte[] { -16, -99, -124, -85 }); String allah = ByteUtil.toString(new byte[] { -17, -73, -78 }); byte[] bbB = ByteUtil.fromString(bb); byte[] allahB = ByteUtil.fromString(allah); assertNotEquals(CmpUtil.compare(bbB, allahB), CmpUtil.compare(bb, allah)); assertNotEquals(CmpUtil.compare(allahB, bbB), CmpUtil.compare(allah, bb)); }