       (f {:name q-name :url q-url})
       (finally
         (delete-queue* q-url)))))
+
+(defn purge-queue*  [queue] (sqs!! :purge-queue  {:queue-url queue}))
+(defn delete-queue* [queue] (sqs!! :delete-queue {:queue-url queue}))
+
+(deftest get-queue-attributes+
+  (with-transient-queue
+    (fn [{q :q-url}]
+      (is (:maximum-message-size
+           (sqs!! :get-queue-attributes {:queue-url q
+                                         :attrs [:maximum-message-size]}))))))
+
+(defn send-message* [queue & [attrs]]
+  (sqs!! :send-message
+         {:message-body "Hello"
+          :queue-url queue
+          :attrs attrs}))
+
+(deftest send-message+
+  (with-transient-queue
+    (fn [{q-url :url}]
+      (is (:id (send-message* q-url))))))
 
 (deftest purge-queue+
   (with-transient-queue


(def sqs!! (test-util/make-issuer :sqs))

(def queue-name "the-best-queue")

(defn get-queue-url* [& [q-name]]
  (sqs!! :get-queue-url {:queue-name (or q-name queue-name)}))

(defn create-queue* [& [q-name]]
  (try
    (sqs!! :create-queue
           {:attrs {:maximum-message-size (* 128 1024)}
            :queue-name (or q-name queue-name)})
    (catch clojure.lang.ExceptionInfo e
      (if (-> e ex-data :type (= :queue-already-exists))
        (get-queue-url* q-name)
        (throw e)))))

(defn purge-queue*  [queue] (sqs!! :purge-queue  {:queue-url queue}))
(defn delete-queue* [queue] (sqs!! :delete-queue {:queue-url queue}))

(deftest create-queue+
  (is (= "http" (-> (create-queue*) (subs 0 4)))))

(deftest get-queue-attributes+
  (let [q (create-queue*)]
    (is (:maximum-message-size
         (sqs!! :get-queue-attributes {:queue-url q
                                       :attrs [:maximum-message-size]})))))

(defn send-message* [& [queue attrs]]
  (sqs!! :send-message
         {:message-body "Hello"
          :queue-url (or queue (create-queue*))
          :attrs attrs}))

(deftest send-message+
  (is (:id (send-message*))))

(defn with-transient-queue [f]
  (let [q-name (str "eulalie-transient-" (gensym))

    (is (failed "0"))))

(deftest send-message-batch+
  (with-transient-queue
    (fn [{q-url :url}]
      (let [attrs  {:attribute-1 [:number 71]}
            {:keys [succeeded]}
            (sqs!! :send-message-batch
                   {:queue-url q-url
                    :messages [{:id "0" :attrs attrs :message-body "Hello!"}]})]
        (is (succeeded "0"))))))

(deftest change-message-visibility+
  (with-transient-queue
