     ;; verify collection associated with services with one supported output formats that does not
     ;; match its input formats, has-formats true
     (service-util/assert-collection-search-result
-      coll1
-      {:has-formats true :service-features {:opendap {:has-formats true}}}
-      [serv1-concept-id serv3-concept-id serv4-concept-id])
+     coll1
+     {:has-formats true :service-features {:opendap {:has-formats true}}}
+     [serv1-concept-id serv3-concept-id serv4-concept-id])
     (service-util/assert-collection-search-result
-      coll2
-      {:has-formats true :service-features {:opendap {:has-formats true}}}
-      [serv1-concept-id serv3-concept-id serv4-concept-id])
+     coll2
+     {:has-formats true :service-features {:opendap {:has-formats true}}}
+     [serv1-concept-id serv3-concept-id serv4-concept-id])
 
     (testing "delete service affect collection search has-formats field"
       ;; Delete service4


        ;; sanity check that all service related fields are true and service associations are present
        (service-util/assert-collection-search-result
          coll5
          {:has-variables true
           :has-formats true
           :has-transforms true
           :has-spatial-subsetting true
           :service-features {:harmony {:has-variables true}
                              :opendap {:has-variables false
                                        :has-formats true
                                        :has-transforms true
                                        :has-spatial-subsetting true}}}
          [serv10-concept-id serv11-concept-id])

        ;; Delete service11
        (ingest/delete-concept serv11-concept {:token token})


      ;; verify has-formats is false after the service with two supported formats is deleted
      (service-util/assert-collection-search-result
       coll1 {:has-formats false} [serv1-concept-id serv3-concept-id])
      (service-util/assert-collection-search-result
       coll2 {:has-formats false} [serv1-concept-id serv3-concept-id]))

    (testing "update service affect collection search has-formats field"
      ;; before update service3, collections' has formats is false
      (service-util/assert-collection-search-result
       coll1
       {:has-formats false :has-transforms false :has-spatial-subsetting false
        :has-temporal-subsetting false :has-variables false}
       [serv1-concept-id serv3-concept-id])
      (service-util/assert-collection-search-result
       coll2
       {:has-formats false :has-transforms false :has-spatial-subsetting false
        :has-temporal-subsetting false :has-variables false}
       [serv1-concept-id serv3-concept-id])

      ;; update service3 to have two supported formats and spatial subsetting
      (service-util/ingest-service-with-attrs
       {:native-id "serv3"
        :Name "service3"
        :ServiceOptions {:SupportedReformattings [{:SupportedInputFormat "PNG"
                                                   :SupportedOutputFormats ["TIFF" "JPEG"]}]
                         :Subset {:SpatialSubset {:BoundingBox {:AllowMultipleValues false}}}}})

      (index/wait-until-indexed)
      ;; verify has-formats is true after the service is updated with two supported formats
      ;; and has-spatial-subsetting is true after service is updated with Spatial SubsetTypes
      ;; the has-transforms is not affected by the SupportedInputFormats or SubsetTypes
      (service-util/assert-collection-search-result
       coll1
       {:has-formats true :has-transforms false :has-spatial-subsetting true
        :has-temporal-subsetting false :has-variables false
        :service-features {:opendap {:has-formats true :has-spatial-subsetting true}}}
       [serv1-concept-id serv3-concept-id])

      ;; update service3 to temporal subsetting and  also have InterpolationTypes
      (service-util/ingest-service-with-attrs
       {:native-id "serv3"
        :Name "service3"
        :ServiceOptions {:SupportedReformattings [{:SupportedInputFormat "PNG"
                                                   :SupportedOutputFormats ["TIFF" "JPEG"]}]
                         :Subset {:TemporalSubset {:AllowMultipleValues false}}
                         :InterpolationTypes ["Nearest Neighbor"]}})
      (index/wait-until-indexed)
      ;; verify has-transforms is true after the service is updated with InterpolationTypes
      (service-util/assert-collection-search-result
       coll1
       {:has-formats true :has-transforms true :has-spatial-subsetting false
        :has-temporal-subsetting true :has-variables false
        :service-features {:opendap
                           {:has-formats true :has-transforms true :has-temporal-subsetting true}}}
       [serv1-concept-id serv3-concept-id])
      (service-util/assert-collection-search-result
       coll2
       {:has-formats true :has-transforms true :has-spatial-subsetting false
        :has-temporal-subsetting true :has-variables false
        :service-features {:opendap
                           {:has-formats true :has-transforms true :has-temporal-subsetting true}}}
       [serv1-concept-id serv3-concept-id]))

    (testing "variable associations together with service associations"
      (let [var-concept (variable-util/make-variable-concept
                         {:Name "Variable1"}
                         {:native-id "var1"
                          :coll-concept-id (:concept-id coll1)})
            {var-concept-id :concept-id} (variable-util/ingest-variable-with-association var-concept)]
        (index/wait-until-indexed)
        ;; verify coll1 has-variables is true after associated with a variable,
        ;; coll2 has-variables is still false
        ;; service level has-variables is not affected by variable association
        (service-util/assert-collection-search-result
         coll1
         {:has-formats true :has-transforms true :has-spatial-subsetting false
          :has-temporal-subsetting true :has-variables true
          :service-features {:opendap
                             {:has-formats true
                              :has-transforms true
                              :has-temporal-subsetting true
                              :has-variables false}}}
         [serv1-concept-id serv3-concept-id] [var-concept-id])
        (service-util/assert-collection-search-result
         coll2
         {:has-formats true :has-transforms true :has-spatial-subsetting false
          :has-temporal-subsetting true :has-variables false
          :service-features {:opendap
                             {:has-formats true
                              :has-transforms true
                              :has-temporal-subsetting true}}}
         [serv1-concept-id serv3-concept-id])))))

(deftest collection-service-search-has-transforms-and-service-deletion-test
  (testing "SupportedInputProjections and SupportedOutputProjections affects has-transforms"
