mock document.cookie for unit test without a real browser on a real web server