     [clojure.string :as string]
     [clojure.test :refer :all]
     [cmr.access-control.test.util :as ac]
+    [cmr.common.date-time-parser :as p]
     [cmr.common.log :as log :refer (debug info warn error)]
     [cmr.common.mime-types :as mt]
-    [cmr.transmit.config :as transmit-config]
     [cmr.common.util :as util]
     [cmr.mock-echo.client.echo-util :as e]
     [cmr.system-int-test.data2.collection :as dc]
     [cmr.system-int-test.data2.core :as d]
     [cmr.system-int-test.data2.granule :as dg]
+    [cmr.system-int-test.data2.umm-spec-collection :as data-umm-c]
     [cmr.system-int-test.system :as s]
     [cmr.system-int-test.utils.dev-system-util :as dev-sys-util]
     [cmr.system-int-test.utils.index-util :as index]
     [cmr.system-int-test.utils.ingest-util :as ingest]
     [cmr.system-int-test.utils.metadata-db-util :as mdb]
     [cmr.system-int-test.utils.search-util :as search]
+    [cmr.transmit.config :as transmit-config]
+    [cmr.umm-spec.models.umm-common-models :as umm-cmn]
     [cmr.umm-spec.test.expected-conversion :as exc]
     [cmr.umm-spec.test.location-keywords-helper :as lkt]
     [cmr.umm-spec.umm-spec-core :as umm-spec]))

;; Verify that the accept header works
(deftest collection-ingest-accept-header-response-test
  (testing "json response"
    (let [concept (dc/collection-concept {:concept-id "C1200000000-PROV1"})
          response (ingest/ingest-concept concept {:accept-format :json :raw? true})]
      (is (= {:concept-id (:concept-id concept) :revision-id 1}
             (select-keys (ingest/parse-ingest-body :json response) [:concept-id :revision-id])))))
  (testing "xml response"
    (let [concept (dc/collection-concept {:concept-id "C1200000001-PROV1"})
          response (ingest/ingest-concept concept {:accept-format :xml :raw? true})]
      (is (= {:concept-id (:concept-id concept) :revision-id 1}
             (select-keys (ingest/parse-ingest-body :xml response) [:concept-id :revision-id]))))))

;; Verify that the accept header works with returned errors
(deftest collection-ingest-with-errors-accept-header-test
  (testing "json response"
    (let [concept-with-empty-body  (assoc (data-umm-c/collection-concept {}) :metadata "")
          response (ingest/ingest-concept concept-with-empty-body
                                          {:accept-format :json :raw? true})
          {:keys [errors]} (ingest/parse-ingest-body :json response)]
      (is (re-find #"XML content is too short." (first errors)))))
  (testing "xml response"
    (let [concept-with-empty-body  (assoc (data-umm-c/collection-concept {}) :metadata "")
          response (ingest/ingest-concept concept-with-empty-body
                                          {:accept-format :xml :raw? true})
          {:keys [errors]} (ingest/parse-ingest-body :xml response)]
