   commodities-context
   {:resource-name "commodity"
    :storage storage-spec
-   :find-resource-fn #(find-commodity % "USD")
-   :find-user-fn #(find-user % "john@doe.com")
-   :find-other-user-fn #(find-user % "jane@doe.com")
+   :find-resource-fn find-commodity
+   :find-user-fn find-user
+   :find-other-user-fn find-other-user
    :delete-fn api/delete
-   :select-resources-fn #(commodities/search
-                           storage-spec
-                           {:entity-id (:id (find-entity % "Personal"))}) })
+   :select-resources-fn select-commodities})

                  :symbol "USD"
                  :type :currency}]})

(deftest-list get-a-list-of-commodities
  commodities-context
  {:resource-name "commodity"
   :storage storage-spec
   :find-user-fn #(find-user % "john@doe.com")
   :find-other-user-fn #(find-user % "jane@doe.com")
   :list-fn api/index
   :params-fn #(hash-map :entity-id (:id (find-entity % "Personal")))
   :expectation-fn #(= #{"USD"} (->> %
                                     (map :symbol)
                                     (into #{})))})

            [clj-money.factories.user-factory]
            [clj-money.serialization :as serialization]
            [clj-money.validation :as validation]
            [clj-money.test-helpers :as h]
            [clj-money.api.commodities :as api]
            [clj-money.models.commodities :as commodities])
  (:import clojure.lang.ExceptionInfo))

(def storage-spec (env :db))

(use-fixtures :each (partial h/reset-db storage-spec))

(def ^:private commodities-context
  {:users (->> ["john@doe.com" "jane@doe.com"]
