### Question:
TagUtil { public static Set<String> extractTags(String tenantName, String words) { if (words != null && !words.contains(",")) words = "," + words + ","; words = words.replace("\\,", "__comma__"); Set<String> coll = new HashSet<String>(); try { ContextProperties conf = new ContextProperties(); int minSize = conf.getInt(tenantName + ".tag.minsize"); int maxSize = conf.getInt(tenantName + ".tag.maxsize"); StringTokenizer st = new StringTokenizer(words, ",", false); while (st.hasMoreTokens()) { String word = st.nextToken(); word = word.replace("__comma__", ","); if (StringUtils.isNotEmpty(word)) { word = word.trim(); if (word.length() >= minSize) { if (word.length() > maxSize) coll.add(word.substring(0, maxSize)); else coll.add(word); } } } } catch (IOException e) { } return coll; }  static Set<String> extractTags(String tenantName, String words); static String normalizeTags(String tenantName, String words); static final int MAX_FIELD_LENGTH; }### Answer:
@Test public void testExtractTags() { Collection<String> coll = TagUtil.extractTags("default","my name is tom"); assertNotNull(coll); assertEquals(1, coll.size()); coll = TagUtil.extractTags("default","il mio,nome, e' tom"); assertNotNull(coll); assertEquals(3, coll.size()); coll = TagUtil.extractTags("default","il mio, nome e' ,123456789123456789123456789"); assertNotNull(coll); assertEquals(3, coll.size()); assertFalse(coll.contains("123456789123456789123456789")); assertTrue(coll.contains("12345678912345678912")); }