new method clearCookies and testcase of setCookies