          (log/error e "failed coercing payload" payload)
          payload)))
 
-(def conn-mgr (delay (make-reusable-conn-manager
-                      {:insecure? true})))
+(def conn-mgr (delay (make-reusable-conn-manager {:insecure? true})))
 
 (defn mk-request [{:keys[test url verb headers params payload] :as  req}]
   (log/info "executing" test ": " verb " " url)


(defn prepare-test [{:keys[exp-headers exp-body options] :as test} opts]
  (try
    (let [options (into #{} (for [opt (str/split options #"\s*,\s*")] (keyword (str/lower-case opt))))
          exp-headers (str->map exp-headers #":")
          exp-body (if-not (str/blank? exp-body)
                     (coerce-payload (replace-opts exp-body opts) (or (get exp-headers "Content-Type") "")))]

                         :body (if (string? payload) payload
                                   (and (seq payload) (json/generate-string payload)))
                         :insecure? true
                         :connection-manager @conn-mgr})
        (catch ExceptionInfo e
          (.getData e)))
      (#(update % :body coerce-payload (get-in % [:headers "Content-Type"])))))
