 (ns cmr.system-int-test.search.acls.collection
   "Tests searching for collections with ACLs in place."
   (:require
+   [clojure.string :as str]
+   [clojure.test :refer :all]
+   [cmr.acl.acl-fetcher :as acl-fetcher]
    [cmr.common-app.test.side-api :as side]
-   [clojure.test :refer :all]
-   [clojure.string :as str]
-   [cmr.acl.acl-fetcher :as acl-fetcher]
    [cmr.common.services.messages :as msg]
-   [cmr.common.util :refer [are2] :as util]
+   [cmr.common.util :as util]
    [cmr.mock-echo.client.echo-util :as e]
    [cmr.system-int-test.data2.atom :as da]
    [cmr.system-int-test.data2.collection :as dc]

      (e/ungrant (s/context) acl2)

      ;; Try searching again before the reindexing
      (is (d/refs-match? [coll1 coll3] (search/find-refs :collection {})))

      ;; Reindex collection permitted groups
      (ingest/reindex-collection-permitted-groups (tc/echo-system-token))
      (index/wait-until-indexed)

      ;; Search after reindexing
      (is (d/refs-match? [coll1 coll2-2] (search/find-refs :collection {}))))

    (testing "reindex all collections"


          (od/assert-collection-opendata-results-match guest-permitted-collections actual-od))))

    (testing "all_revisions"
      (util/are3 [collections params]
        (d/assert-refs-match collections (search/find-refs :collection params))

        ;; only old revisions satisfy ACL - they should not be returned
        "provider-id all-revisions=false"
