 (deftest sell-a-commodity
   (let [context (serialization/realize storage-spec purchase-context)
         ira (find-account context "IRA")
-        commodity-account (find-account context "AAPL")
         ltcg (find-account context "Long-term Capital Gains")
         commodity (find-commodity context "AAPL")
         purchase (trading/buy storage-spec {:account-id (:id ira)


(deftest selling-a-commodity-updates-a-lot-record
  (let [context (serialization/realize storage-spec (sell-context))
        [ira] (:accounts context)
        commodity (find-commodity context "AAPL")
        _ (trading/sell storage-spec (-> context
                                         sale-attributes

                                            :trade-date (t/local-date 2016 3 2)
                                            :shares 100M
                                            :value 1000M})
        commodity-account (->> {:entity-id (-> context :entities first :id)
                                            :commodity-id (:id commodity)}
                               (accounts/search storage-spec)
                               first)
        lot (-> purchase :lot)
        result (trading/sell storage-spec (sale-attributes context))
        actual-transaction (-> result
