### Question:
CommonTokensMatcher extends TokeniserMatcher { @Override public boolean matches(String s1, String s2) { logger.trace("s1 {}; s2 {}", s1, s2); if (s1 == null && s2 == null) return true; String[] a1 = convToArray(s1); String[] a2 = convToArray(s2); return calculateTokensInCommon(a1,a2); }  @Override boolean matches(String s1, String s2); double getMinRatio(); void setMinRatio(double minRatio); boolean isDeduplicateTokens(); void setDeduplicateTokens(boolean deduplicateTokens); @Override int getCost(); @Override boolean isExact(); @Override String getExecutionReport(); static int COST; }### Answer:
@Test public void testMatchesExactly() { CommonTokensMatcher matcher = new CommonTokensMatcher(); assertTrue("Exact match", matcher.matches("abc 123!", "abc 123!")); }
@Test public void testDelimiter() { CommonTokensMatcher matcher = new CommonTokensMatcher(); assertFalse("Delimiter", matcher.matches("USA", "U.S.A.")); matcher.setDelimiter(""); assertTrue("Delimiter", matcher.matches("USA", "U.S.A.")); assertTrue("Delimiter", matcher.matches("abc", "abcd")); }