 (ns cmr.system-int-test.search.collection-humanized-search-test
   "Integration test for CMR collection search by humanized fields"
   (:require
+   [cheshire.core :as json]
+   [clj-http.client :as client]
    [clojure.string :as str]
    [clojure.test :refer :all]
    [cmr.common-app.test.side-api :as side]
+   [cmr.mock-echo.client.echo-util :as e]
    [cmr.search.services.humanizers.humanizer-report-service :as hrs]
    [cmr.system-int-test.data2.core :as d]
    [cmr.system-int-test.data2.umm-spec-collection :as data-umm-c]
+   [cmr.system-int-test.system :as s]
    [cmr.system-int-test.utils.humanizer-util :as hu]
    [cmr.system-int-test.utils.index-util :as index]
    [cmr.system-int-test.utils.ingest-util :as ingest]
    [cmr.system-int-test.utils.search-util :as search]
+   [cmr.system-int-test.utils.url-helper :as url]
    [cmr.umm-spec.test.location-keywords-helper :as lkt]))
 
 (use-fixtures :each (join-fixtures

    {:system (get-in user/system [:apps :search])}))
;;3. Retrieve the reporting
;;  curl http://localhost:3003/humanizers/report

(deftest humanizer-report
  (d/ingest-umm-spec-collection "PROV1" (data-umm-c/collection 1

              "PROV1,C1200000008-PROV1,B,V2,AM-1,Terra"
              "PROV1,C1200000009-PROV1,C,V3,Bioosphere,Biosphere"
              "PROV1,C1200000009-PROV1,C,V3,USGS_SOFIA,USGS SOFIA"]
             (str/split report #"\n")))
      (testing "Ensure that the returned report is the same as the cached one"
      (is (= report (get-cached-report)))))))

(deftest humanizer-report-batch
  (side/eval-form `(hrs/set-humanizer-report-collection-batch-size! 10))
