             _ (index/wait-until-indexed)
 
             ;;Search for the grid, it should return the association
-            grid-search-result (search-request "grids.json" "name=Grid-A7-v1")
-            grid-search-body (json/parse-string (:body grid-search-result) true)
-            grid-search-generic-associations (get-in (first (:items grid-search-body)) [:associations :tools])
-            grid-search-generic-association-details (get-in (first (:items grid-search-body)) [:association-details :tools])
+            grid-search-result (get-associations-and-details "grids.json" "name=Grid-A7-v1" :tools false)
 
             ;;Search for the tool, it should return the association
-            tl1-search-result (search-request "tools.umm_json" "native_id=tl1")
-            tl1-search-body (json/parse-string (:body tl1-search-result) true)
-            tl1-search-generic-associations (get-in (first (:items tl1-search-body)) [:meta :associations :grids])
+            tl1-search-result (get-associations-and-details "tools.umm_json" "native_id=tl1" :grids true)
+
+            ;;Update the tool and the grid, search for the grid and the tool, it should return the association.
+            _ (gen-util/ingest-generic-document nil "PROV1" native-id :grid grid-doc :post)
+            _ (tool-util/ingest-tool-with-attrs {:native-id "tl1" :Name "tool1"})
+            grid-search-result-update (get-associations-and-details "grids.json" "name=Grid-A7-v1" :tools false)
+
+            tl1-search-result-update (get-associations-and-details "tools.umm_json" "native_id=tl1" :grids true)
 
             ;;Dissociate the association
             response4 (association-util/generic-dissociate-by-concept-ids-revision-ids


        ;; Search for the grid returns the var1 as generic association
        (is (= [var1-concept-id]
               (:variables grid-search-generic-associations)))

        ;; Search for the variable returns the grid as generic association
        (is (= [{:concept-id grid-concept-id :revision-id grid-revision-id}]
               var1-search-generic-associations))

        ;; Dissociation of the association is successful
        (is (= 200 (:status response4)))

        ;; Search for the grid again doesn't return the var1 as generic association
        (is (= nil grid-search-generic-associations1))

        ;; Search for the variable again doesn't return the grid as generic association
        (is (= nil  var1-search-generic-associations1))))
    
    (testing "Associate collection with collection by concept-id and revision-ids"
      ;;since we ingested two collections in this test, it's better to do the collection-to-collection association test here.

            _ (index/wait-until-indexed)

            ;;Search for the grid again, it should NOT return the association
            grid-search-result1 (get-associations-and-details "grids.json" "name=Grid-A7-v1" :variables false)

            ;;Search for the variable again, it should NOT return the association
            var1-search-result1 (get-associations-and-details "variables.umm_json" "native_id=var1" :grids false)]
        ;; The first and second associations are successful
        (is (= 200 (:status response1) (:status response2)))

