TagUtil { public static boolean removeTag(String tag, Map<String, String> properties) { String tagsValue = properties.get(TAGS); Set<String> tags = parseTags(tagsValue); boolean result = tags.remove(tag); tagsValue = formatTags(tags); properties.put(TAGS, tagsValue); return result; } private  TagUtil(); static boolean removeTag(String tag, Map<String, String> properties); static Set<String> parseTags(String tagsValue); static boolean addTag(String tag, Map<String, String> properties); static void remove(String[] tags, Map<String, String> properties); static void add(String[] tags, Map<String, String> properties); static final String TAGS; }
@Test public void testRemoveTag() { Assert.assertTrue(TagUtil.removeTag("test1", properties)); Assert.assertFalse(properties.get(TagUtil.TAGS).contains("test1")); }