### Question:
WeightedLevenshtein implements Comparator { public double compare(String s1, String s2) { if (s1.equals(s2)) return 1.0; int len = Math.min(s1.length(), s2.length()); double dist = distance(s1, s2, estimator); if (dist > len) return 0.0; return 1.0 - (dist / ((double) len)); } WeightedLevenshtein(); double compare(String s1, String s2); boolean isTokenized(); void setEstimator(WeightEstimator estimator); WeightEstimator getEstimator(); static double distance(String s1, String s2, WeightEstimator weight);  }### Answer:
@Test public void testComparator() { WeightedLevenshtein comp = new WeightedLevenshtein(); assertEquals(0.0, comp.compare("1", "")); }