                       :max-age 123}}
         handler (constantly {:cookies cookies})
         resp    ((wrap-cookies handler) {})]
-    (is (= {"Set-Cookie" (list "a=b;Path=/;Secure;HttpOnly;Max-Age=123")}
-           (:headers resp)))))
+    (is (= {"Set-Cookie" #{"a=b" "Path=/" "Secure" "HttpOnly" "Max-Age=123"}}
+           (split-set-cookie (:headers resp))))))
 
 (deftest wrap-cookies-accepts-expires
   (let [cookies {"a" {:value "b", :path "/",

        handler (constantly {:cookies cookies})
        resp    ((wrap-cookies handler) {})
        expires "Thu, 31 Dec 2015 00:00:00 +0000"]
    (is (= {"Set-Cookie" (list (str "a=b;Path=/;Secure;HttpOnly;Expires=" expires))}
           (:headers resp)))))

(deftest wrap-cookies-throws-exception-when-not-using-intervals-correctly
  (let [cookies {"a" {:value "b", :path "/",

                      :expires "123"}}
        handler (constantly {:cookies cookies})
        resp    ((wrap-cookies handler) {})]
    (is (= {"Set-Cookie" #{"a=b" "Path=/" "Secure" "HttpOnly" "Expires=123"}}
           (split-set-cookie (:headers resp))))))

(deftest wrap-cookies-accepts-max-age-from-clj-time
  (let [cookies {"a" {:value "b", :path "/",
