 
 (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))))
+    (let [options (into {} (for [opt (str/split options #"\s*,\s*")
+                                 :let[[_ key _ _ value] (re-find #"\s*([^:=]+)((:|=)([^\s]+))?\s*" opt) ]
+                                 :when key]
+                             [(keyword (str/lower-case key)) (or value :true)]))
           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") "")))]

                        nil)])])])
              out))))

(defn -main
  "Executes HTTP requests specified in the argument provided spreadsheet."
  [& args]
  (when-not (seq args)
    (println "Usage: \njava -jar rester-0.1.0-beta2.jar <rest-test-cases.csv> [placeholder replacements as :placeholder-name value]
or
lein run -m rester.core <rest-test-cases.csv> [placeholder replacements as :placeholder-name value]")
    (System/exit 1))

  (let [pool-size (Integer/parseInt (or (System/getProperty "thread-pool-size") "4"))]
    (log/info "thread pool size:" pool-size)
    (set-agent-send-executor! (Executors/newFixedThreadPool pool-size))
    (set-agent-send-off-executor! (Executors/newFixedThreadPool pool-size)))
  (try
    (let [opts (apply hash-map (map-indexed #(if (even? %1) (subs %2 1) %2) (rest args)))
          tests-file (first args)
          results (-> tests-file (tests-from (opts "sheet")) (exec-tests opts) summarise-results)]
      ((juxt #(junit-report opts tests-file %) print-test-results) results)
      (System/exit (- (results :total 0) (results :success 0))))
    (finally
      (shutdown-agents))))

                         :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"])))))
