 (when-let [endpoint (:endpoint *client-opts*)]
   (when (.contains ^String endpoint "localhost")
     (expect
-      (let [;; Generate > 100 tables to exceed the batch size limit:
-            tables (map #(keyword (str "test_" %)) (range 102))]
-        (doseq [table tables]
-          (far/ensure-table *client-opts* table [:id :n]
-            {:throughput  {:read 1 :write 1}
-             :block?      true}))
-        (let [table-count (count (far/list-tables *client-opts*))]
-          (doseq [table tables]
-            (far/delete-table *client-opts* table))
-          (> table-count 100))))))
+     (let [ ;; Generate > 100 tables to exceed the batch size limit:
+           tables (map #(keyword (str "test_" %)) (range 102))]
+       (doseq [table tables]
+         (far/ensure-table *client-opts* table [:id :n]
+                           {:throughput  {:read 1 :write 1}
+                            :block?      true}))
+       (let [table-count (count (far/list-tables *client-opts*))]
+         (doseq [table tables]
+           (far/delete-table *client-opts* table))
+         (> table-count 100))))
+
+    (let [update-t :faraday.tests.update-table]
+      (after-setup!
+       #(do
+          (when (far/describe-table *client-opts* update-t)
+            (far/delete-table *client-opts* update-t))
+          (far/create-table
+           *client-opts* update-t [:id :n]
+           {:throughput {:read 1 :write 1} :block? true})))
+
+      (expect
+       {:read 2 :write 2}
+       (-> (far/update-table *client-opts* update-t {:read 2 :write 2})
+           deref
+           :throughput
+           (select-keys #{:read :write}))))))


(def ttable :faraday.tests.main)
(def range-table :faraday.tests.range)

(defn- before-run {:expectations-options :before-run} []
  (assert (and (:access-key *client-opts*)

(let [i0 {:id 0 :name "foo"}
      i1 {:id 1 :name "bar"}]

  (after-setup!
   #(far/batch-write-item *client-opts*
                          {ttable {:delete [{:id 0} {:id 1} {:id 2}]}}))

  (expect ; Batch put
   [i0 i1 nil] (do (far/batch-write-item *client-opts* {ttable {:put [i0 i1]}})
