### Question:
SoundexComparator implements Comparator { public double compare(String s1, String s2) { if (s1.equals(s2)) return 1.0; if (soundex(s1).equals(soundex(s2))) return 0.9; return 0.0; }  double compare(String s1, String s2); boolean isTokenized(); static String soundex(String str);  }### Answer:
@Test public void testEqual() { assertEquals("wrong score for equal values", 1.0, comp.compare("LMG", "LMG")); }
@Test public void testEqualCode() { assertEquals("wrong score for values with equal codes", 0.9, comp.compare("Garshol", "Garskol")); }
@Test public void testDifferentCode() { assertEquals("wrong score for values with different codes", 0.0, comp.compare("Garshol", "Sue")); }