   (with-redefs [recvd-reqs (atom [])]
     (f)))
 
-(use-fixtures :once icecap-fixture http-server-fixture)
+(use-fixtures :once e2e/icecap-fixture http-server-fixture)
 (use-fixtures :each store-reqs-fixture)
 
 (deftest http-tests
   (let [plan {:type :http
               :method :GET
               :url (str http-server-base-url "/test/example")}
-        create-result (spy @(create-cap plan))
-        cap-url (:cap (get-body create-result))
-        exercise-result @(execute-cap cap-url)]
+        create-result @(e2e/create-cap plan)
+        cap-url (:cap (spy (e2e/get-body create-result)))
+        exercise-result @(e2e/execute-cap cap-url)]
     ;; Was the cap successfully created?
     (is (= (:status create-result) 201))
     (is (some? cap-url))

             request)))))

(deftest invalid-http-step-tests
  (are [step expected] (= {:error expected} (get-body @(create-cap step)))
    {:type :http} '{:url missing-required-key
                    :method missing-required-key}))

  [f]
  (let [server (http/start-server handler {:port http-server-port})]
    (with-redefs [http-server server]
      (try (f) (finally (.close http-server))))))

(defn ^:private store-reqs-fixture
  "A fixture that resets the request store."
