     (is (validation/has-error? transaction :items) "Validation error should be present")))
 
 (deftest sum-of-debits-must-equal-sum-of-credits
-  (let [context (serialization/realize storage-spec create-context)
+  (let [context (serialization/realize storage-spec base-context)
         transaction (transactions/create
                       storage-spec
                       (-> (attributes context)

        "The checking account has the correct balance")))

(def multi-context
  {:users [(factory :user, {:email "john@doe.com"})]
   :entities [{:name "Personal"
               :user-id "john@doe.com"}]
   :commodities [{:name "US Dollar"
                  :symbol "USD"
                  :type :currency}]
   :accounts [{:name "Checking"
               :type :asset
               :entity-id "Personal"
               :commodity-id "USD"}
              {:name "Salary"
               :type :income
               :entity-id "Personal"
               :commodity-id "USD"}
              {:name "Bonus"
               :type :income
               :entity-id "Personal"
               :commodity-id "USD"}
              {:name "Groceries"
               :type :expense
               :entity-id "Personal"
               :commodity-id "USD"}]
   :transactions [{:transaction-date (t/local-date 2016 3 2)
                   :entity-id "Personal"
                   :description "Paycheck"
                   :items [{:action :debit
                            :account-id "Checking"
                            :amount 1000}
                           {:action :debit
                            :account-id "Checking"
                            :amount 100}
                           {:action :credit
                            :account-id "Salary"
                            :amount 1000}
                           {:action :credit
                            :account-id "Bonus"
                            :amount 100}]}
                  {:transaction-date (t/local-date 2016 3 10)
                   :entity-id "Personal"
                   :description "Kroger"
                   :items [{:action :debit
                            :account-id "Groceries"
                            :amount 100}
                           {:action :credit
                            :account-id "Checking"
                            :amount 100}]}]})

(deftest create-a-transaction-with-multiple-items-for-one-account
  (let [context (serialization/realize storage-spec multi-context)

            "Groceries should have the correct balance after delete")))))

(def update-context
  (merge
    base-context
    {:transactions [{:transaction-date (t/local-date 2016 3 2)
                     :entity-id "Personal"
                     :description "Paycheck"
                     :items [{:action :debit
                              :account-id "Checking"
                              :amount 1000}
                             {:action :credit
                              :account-id "Salary"
                              :amount 1000}]}
                    {:transaction-date (t/local-date 2016 3 12)
                     :entity-id "Personal"
                     :description "Kroger"
                     :items [{:action :debit
                              :account-id "Groceries"
                              :amount 101}
                             {:action :credit
                              :account-id "Checking"
                              :amount 101}]}
                    {:transaction-date (t/local-date 2016 3 22)
                     :entity-id "Personal"
                     :description "Kroger"
                     :items [{:action :debit
                              :account-id "Groceries"
                              :amount 102}
                             {:action :credit
                              :account-id "Checking"
                              :amount 102}]}]}))

(deftest get-a-transaction
  (let [context (serialization/realize storage-spec update-context)
