 (defn response-etag
   [request]
   (get-in request [:headers "etag"]))
+
+(defn etag-with-gzip-suffix
+  [etag]
+  (if (.endsWith etag "--gzip")
+    etag
+    (str etag "--gzip")))
+
+(defn etag-without-gzip-suffix
+  [etag]
+  (str/replace etag #"--gzip$" ""))
 
 (defn response->class-info-map
   [response]

                     (str
                      "unexpected status code for test response after code change "
                      "but test environment not invalidated"))
                 (is (= test-etag-initial (response-etag
                                           test-response-after-prod-flush))
                     "unexpected etag change when test environment not invalidated")
                 (is (empty? (:body test-response-after-prod-flush))
                     "unexpected body for test response")))))

                   (str
                    "unexpected status code for test response after code change "
                    "but before flush"))
               (is (= test-etag-initial-without-gzip-suffix (response-etag
                                                              test-response-before-flush))
                   "unexpected etag change when no test environment change")
               (is (empty? (:body test-response-before-flush))
                   "unexpected body for test response")
