KeywordsUtil { public static String toFuzzy(String keywords) { if (keywords == null) { return null; } if (!keywords.endsWith(StringPool.TILDE)) { keywords = keywords + StringPool.TILDE; } return keywords; }  static String escape(String text); static String toFuzzy(String keywords); static String toWildcard(String keywords); static final String[] SPECIAL; }
@Test public void testToFuzzyFuzzyText() { Assert.assertEquals("abc~", KeywordsUtil.toFuzzy("abc~")); }
@Test public void testToFuzzyNonfuzzyText() { Assert.assertEquals("abc~", KeywordsUtil.toFuzzy("abc")); }
@Test public void testToFuzzyNullText() { Assert.assertNull(KeywordsUtil.toFuzzy(null)); }