 
 (deftest request-response-with-ttl
   (let [queue (create-queue "rr-queue")
-        latch (java.util.concurrent.CountDownLatch. 1)]
+        latch (CountDownLatch. 1)]
     (with-open [listener (.respond queue
                            (handler (fn [m]
                                       (.countDown latch)

      (is (= "hi" (.body msg))))

    ;; a stopped queue should no longer be avaiable
    (.stop queue)
    (is (thrown? javax.jms.InvalidDestinationRuntimeException
          (.receive queue codecs (coerce-receive-options {:timeout 1}))))))

(deftest publish-should-use-the-passed-context
  (let [c (.createContext default nil)
        q (create-queue "publish-c")]
    (.close c)
    (is (thrown? javax.jms.IllegalStateRuntimeException
          (.publish q "boom" None/INSTANCE
            (coerce-publish-options {:context c}))))))


  (:require [clojure.test :refer :all])
  (:import [org.projectodd.wunderboss Option WunderBoss]
           [org.projectodd.wunderboss.codecs Codecs None StringCodec]
           [org.projectodd.wunderboss.messaging
            Messaging
            Context Context$Mode
            ConcreteReply
            Destination Destination$ListenOption Destination$ReceiveOption
