KeywordsUtil { public static String toWildcard(String keywords) { if (keywords == null) { return null; } if (!keywords.endsWith(StringPool.STAR)) { keywords = keywords + StringPool.STAR; } return keywords; }  static String escape(String text); static String toFuzzy(String keywords); static String toWildcard(String keywords); static final String[] SPECIAL; }
@Test public void testToWildcardNullText() { Assert.assertNull(KeywordsUtil.toWildcard(null)); }
@Test public void testToWildcardSimpleText() { Assert.assertEquals("abc*", KeywordsUtil.toWildcard("abc")); }
@Test public void testToWildcardWildcardText() { Assert.assertEquals("abc*", KeywordsUtil.toWildcard("abc*")); }