### Question:
AuthorCommonTokensMatcher extends CommonTokensMatcher { @Override public boolean matches(String s1, String s2) { boolean matches = false; if (s1 == null && s2 == null) matches = true; else{ matches = super.matches(clean(s1),clean(s2)); } return matches; }  @Override int getCost(); @Override boolean matches(String s1, String s2); @Override boolean isExact(); @Override String getExecutionReport(); static int COST; }### Answer:
@Test public void testMatchesExactly () throws Exception { AuthorCommonTokensMatcher matcher = new AuthorCommonTokensMatcher(); assertTrue(matcher.matches("Hans D.", "Hans D.")); }
@Test public void testMatchesWithpunctuation () throws Exception { AuthorCommonTokensMatcher matcher = new AuthorCommonTokensMatcher(); assertFalse(matcher.matches("Hans Delafontaine", "Hans De-la-fointaine")); }
@Test public void testMatchesWithDiacrits () throws Exception { AuthorCommonTokensMatcher matcher = new AuthorCommonTokensMatcher(); assertTrue(matcher.matches("Jaques Leblée", "Jaques Leblee")); }