fields.clear();
response.addSetCookie("minimal","value",null,null,-1,null,false,false,-1);
assertEquals("minimal=value",fields.get("Set-Cookie"));
fields.clear();
//test cookies with same name, domain and path, only 1 allowed
response.addSetCookie("everything","wrong","domain","path",0,"to be replaced",true,true,0);
response.addSetCookie("everything","value","domain","path",0,"comment",true,true,0);
assertEquals("everything=value;Version=1;Path=path;Domain=domain;Expires=Thu, 01-Jan-1970 00:00:00 GMT;Max-Age=0;Secure;HttpOnly;Comment=comment",fields.get("Set-Cookie"));
Enumeration<String> e =fields.getValues("Set-Cookie");