                                                   :version-id "v2"
                                                   :short-name "s2"}))
         concept2 {:provider-id "PROV1"
-                 :concept-type :collection
-                 :native-id (:entry-title coll2-2)}
-        coll2-tombstone (merge (ingest/delete-concept concept2) concept2 {:deleted true})
+                  :concept-type :collection
+                  :native-id (:entry-title coll2-2)}
+        coll2-3-tombstone (merge (ingest/delete-concept concept2) concept2 {:deleted true})
 
         coll3 (d/ingest "PROV2" (dc/collection {:entry-title "et3"
-                                                  :entry-id "eid3"
-                                                  :version-id "v4"
-                                                  :short-name "s1"}))]
+                                                :entry-id "eid3"
+                                                :version-id "v4"
+                                                :short-name "s1"}))]
     (index/wait-until-indexed)
     (testing "find-references-with-all-revisions parameter"
       (are2 [collections params]

            {:native-id "et1"}

            "native-id all-revisions=true"
            [coll1-1 coll1-tombstone coll1-3]
            {:native-id "et1" :all-revisions true}

            "version all-revisions=false"

            {:concept-id "C1200000000-PROV1"}

            "concept-id all-revisions true"
            [coll1-1 coll1-2-tombstone coll1-3]
            {:concept-id "C1200000000-PROV1" :all-revisions true}

            "all-revisions true"
            [coll1-1 coll1-2-tombstone coll1-3 coll2-1 coll2-2 coll2-3-tombstone coll3]
            {:all-revisions true}))))

(deftest search-all-revisions-error-cases
  (testing "collection search with all_revisions bad value"
    (let [{:keys [status errors]} (search/get-search-failure-data
                                    (search/find-refs :collection {:all-revisions "foo"}))]
      (is (= [400 ["Parameter all_revisions must take value of true, false, or unset, but was [foo]"]]
             [status errors]))))
  (testing "granule search with all_revisions parameter is not supported"
    (let [{:keys [status errors]} (search/get-search-failure-data
                                    (search/find-refs :granule {:provider-id "PROV1"
                                                                :all-revisions false}))]
      (is (= [400 ["Parameter [all_revisions] was not recognized."]]
             [status errors]))))
  (testing "granule search with all_revisions bad value"
    (let [{:keys [status errors]} (search/get-search-failure-data
                                    (search/find-refs :granule {:provider-id "PROV1"
                                                                :all-revisions "foo"}))]
      (is (= [400 ["Parameter [all_revisions] was not recognized."
                   "Parameter all_revisions must take value of true, false, or unset, but was [foo]"]]
             [status errors])))))

