           (migrate!)
           (add-certname! certname)
           (let [hash1 (add-catalog! catalog)]
-            (associate-catalog-with-certname! hash1 certname (java.util.Date.))
+            (associate-catalog-with-certname! hash1 certname (now))
             (delete-catalog! hash1))
           (garbage-collect!)
 

          (migrate!)
          (add-certname! certname)
          (let [hash1 (add-catalog! catalog)]
            (associate-catalog-with-certname! hash1 certname (java.util.Date.))
            (dissociate-catalog-with-certname! hash1 certname))

          (is (= (query-to-vec ["SELECT * FROM certname_catalogs"])

          (let [hash1 (add-catalog! catalog)
                ;; Store the same catalog for a different host
                hash2 (add-catalog! (assoc catalog :certname "myhost2.mydomain.com"))]
            (associate-catalog-with-certname! hash1 certname (now))
            (associate-catalog-with-certname! hash2 "myhost2.mydomain.com" (now))
            (delete-catalog! hash1))

          ;; myhost should still be present in the database
