 
 (def ^:private api (#'cmr.search.api.routes/build-routes
                      {:search-public-conf {:protocol "https" :relative-root-url "/search"}}))
-
-;; referring the private get-search-results-format function into this namespace for testing
-(def get-search-results-format (ns-resolve 'cmr.search.api.routes 'get-search-results-format))
 
 (defn- substring?
   [test-value string]

(deftest get-search-results-format-test
  (testing "format from headers"
    (are [path headers default-mime-type expected-format]
         (=  expected-format (get-search-results-format path headers default-mime-type))
         ;; Accept header
         "search/collections" {"accept" "application/echo10+xml"} "application/xml" :echo10
         "search/collections" {"accept" "application/dif+xml"} "application/xml" :dif


  (testing "format from extension"
    (are [path headers default-mime-type expected-format]
         (=  expected-format (#'r/get-search-results-format path headers default-mime-type))
         "search/collections.echo10" {"accept" "application/dif+xml"} "application/xml" :echo10
         "search/collections.dif" {"accept" "application/json"} "application/xml" :dif
         "search/collections.dif10" {"accept" "application/json"} "application/xml" :dif10
