LongestCommonSubstringComparator extends TextSimilarityMeasureBase { @Override public double getSimilarity(Collection<String> stringList1, Collection<String> stringList2) throws SimilarityException { return getSimilarity(StringUtils.join(stringList1, " "), StringUtils.join(stringList2, " ")); }  @Override double getSimilarity(Collection<String> stringList1,
			Collection<String> stringList2); @Override double getSimilarity(String string1, String string2);  }
@Test public void test() throws Exception { String a1 = "test String1"; String a2 = "test String2"; String b1 = "This is my string"; String b2 = "That is your string"; TermSimilarityMeasure measure = new LongestCommonSubstringComparator(); assertEquals(0.9166, measure.getSimilarity(a1, a2), epsilon); assertEquals(0.3888, measure.getSimilarity(b1, b2), epsilon); }