### Question:
CookieUtil { public static String removeCookie(String cookieHeader, String name) { StringBuilder sb = new StringBuilder(); int counter = 0; boolean changed = false; if (StringUtils.isNotBlank(cookieHeader)) { for (final String cookie : cookieHeader.split(";")) { final String[] cookieParts = cookie.split("=", 2); if (StringUtils.equals(StringUtils.trim(cookieParts[0]), name)) { changed = true; continue; } if (counter++ > 0) sb.append(';'); sb.append(cookie); } } if (!changed) return cookieHeader; return sb.toString(); }  static String setCookie(String cookieHeader, String name, String value); static String removeCookie(String cookieHeader, String name);  }### Answer:
@Test public void removeCookie() { String c = "a=1;b=2"; assertSame(c, CookieUtil.removeCookie(c, "c")); assertEquals("", CookieUtil.removeCookie("a=b", "a")); assertEquals("a=1;c=3", CookieUtil.removeCookie("a=1;b=2;c=3", "b")); assertEquals("", CookieUtil.removeCookie("a=1;a=2;a=3", "a")); }