### Question:
BasicEditDistance { public static double getEditDistance(CharSequence s, CharSequence t) { return getEditDistance(s, t, DEFAULT_OPERATIONS_WEIGHTS); } private  BasicEditDistance(); static double getEditDistance(CharSequence s, CharSequence t); static double getEditDistance(CharSequence s,
                                         CharSequence t,
                                         OperationsWeights operationsWeights);  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testGetEditDistanceFirstIsNull() { getEditDistance(null, "abc"); }
@Test(expected = IllegalArgumentException.class) public void testGetEditDistanceSecondIsNull() { getEditDistance("abc", null); }
@Test public void testGetEditDistance1() { CharSequence s = "abc"; CharSequence t = ""; assertEquals(3.0, getEditDistance(s, t), EPSILON); assertEquals(3.0, getEditDistance(t, s), EPSILON); }
@Test public void testGetEditDistance2() { CharSequence s = "abc"; CharSequence t = "b"; assertEquals(2.0, getEditDistance(s, t), EPSILON); assertEquals(2.0, getEditDistance(t, s), EPSILON); }
@Test public void testGetEditDistance3() { CharSequence s = "abc"; CharSequence t = "abc"; assertEquals(0.0, getEditDistance(s, t), EPSILON); assertEquals(0.0, getEditDistance(t, s), EPSILON); }
@Test public void testGetEditDistance4() { CharSequence s = "abc"; CharSequence t = "dce"; assertEquals(3.0, getEditDistance(s, t), EPSILON); assertEquals(3.0, getEditDistance(t, s), EPSILON); }
@Test public void testGetEditDistance5() { CharSequence s = "abc"; CharSequence t = "dec"; assertEquals(2.0, getEditDistance(s, t), EPSILON); assertEquals(2.0, getEditDistance(t, s), EPSILON); }
@Test public void testGetEditDistance6() { CharSequence s = "abc"; CharSequence t = "dce"; assertEquals(3.5, getEditDistance(s, t, hugeSubstitutionOperationsWeights), EPSILON); assertEquals(3.5, getEditDistance(t, s, hugeSubstitutionOperationsWeights), EPSILON); }
@Test public void testGetEditDistance7() { CharSequence s = "abcdefg"; CharSequence t = "xbcdefg"; assertEquals(1.5, getEditDistance(s, t, hugeSubstitutionOperationsWeights), EPSILON); assertEquals(1.5, getEditDistance(t, s, hugeSubstitutionOperationsWeights), EPSILON); }
@Test public void testGetEditDistance8() { CharSequence s = "abcdefg"; CharSequence t = "xbcdeg"; assertEquals(2.5, getEditDistance(s, t, hugeSubstitutionOperationsWeights), EPSILON); assertEquals(2.5, getEditDistance(t, s, hugeSubstitutionOperationsWeights), EPSILON); }