NaturalOrder implements Comparator<String> { @Override public int compare(String o1, String o2) { return compareStrings(o1, o2); }  static final int compareStrings(String s1, String s2); @Override int compare(String o1, String o2);  }
@Test public void testCompare() { System.out.println("compare"); String s1 = "i"; String s2 = "I"; int expResult = 0; int result = NaturalOrder.compareStrings(s1, s2); assertEquals(expResult, result); s1 = "ISAAC metadata (ISAAC)"; s2 = "health concept"; result = NaturalOrder.compareStrings(s1, s2); assertTrue(result > 0); s1 = "1"; s2 = "10"; result = NaturalOrder.compareStrings(s1, s2); assertTrue(result < 0); s1 = "2"; s2 = "10"; result = NaturalOrder.compareStrings(s1, s2); assertTrue(result < 0); }