EditexSoundex { public static int distance(String str1,String str2){ return distance(Transformations.convertStringToIntArray(str1),Transformations.convertStringToIntArray(str2)); }  static int distance(String str1,String str2); static int distance(int str1[],int str2[]); static EditexSoundexCostCalculator costCalc; }
@Test public void test1(){ String str1 = "kitten"; String str2 = "sitting"; int res = EditexSoundex.distance(str1,str2); Asserts.assertEquals(res, 3); }
@Test public void test2(){ String str1 = "cooked"; String str2 = "cooking"; int res = EditexSoundex.distance(str1,str2); Asserts.assertEquals(res, 4); }
@Test public void test3(){ String str1 = "running"; String str2 = "swimming"; int res = EditexSoundex.distance(str1,str2); Asserts.assertEquals(res, 6); }