 
 (deftest commodity-id-is-required
   (let [context (serialization/realize storage-spec price-context)
-        commodity (-> context :commodities first)
+        commodity (find-commodity context "AAPL")
         price (prices/create storage-spec {:trade-date (t/local-date 2017 3 2)
                                            :price 12.34M})
         prices (prices/search storage-spec {:commodity-id (:id commodity)


(deftest price-must-be-a-number
  (let [context (serialization/realize storage-spec price-context)
        commodity (-> context :commodities first)
        price (prices/create storage-spec {:commodity-id (:id commodity)
                                           :trade-date (t/local-date 2017 3 2)
                                           :price "notanumber"})


(deftest trade-date-can-be-a-string-date
  (let [context (serialization/realize storage-spec price-context)
        commodity (find-commodity context "AAPL")
        price (prices/create storage-spec {:commodity-id (:id commodity)
                                           :trade-date "2017-03-02"
                                           :price 12.34M})
