   (testing "Two clauses (no match, custom default)"
     (let [request {:request-method :delete}]
       (is (= 404
-            (:status (->method request
+            (:status (c/->method request
                        :get {:status 200
                              :body   "Data"}
                        :put {:status 200

  (testing "Two clauses (with match)"
    (let [request {:request-method :put}]
      (is (= "Updated"
            (:body (->method request
                     :get {:status 200
                           :body   "Data"}
                     :put {:status 200

        not-found {:status 404
                   :body   "Not found"}]
    (testing "->get"
      (is (= 405 (:status (c/->get request-put ok))))
      (is (= 404 (:status (c/->get request-put ok not-found))))
      (is (= 200 (:status (c/->get request-get ok))))
      (is (= 200 (:status (c/->get request-get ok not-found)))))
    (testing "->head"
      (is (= 405 (:status (c/->head request-put ok))))
      (is (= 404 (:status (c/->head request-put ok not-found))))
      (is (= 200 (:status (c/->head request-head ok))))
      (is (= 200 (:status (c/->head request-head ok not-found)))))
    (testing "->options"
      (is (= 405 (:status (c/->options request-put ok))))
      (is (= 404 (:status (c/->options request-put ok not-found))))
      (is (= 200 (:status (c/->options request-options ok))))
      (is (= 200 (:status (c/->options request-options ok not-found)))))
    (testing "->put"
      (is (= 405 (:status (c/->put request-get ok))))
      (is (= 404 (:status (c/->put request-get ok not-found))))
      (is (= 200 (:status (c/->put request-put ok))))
      (is (= 200 (:status (c/->put request-put ok not-found)))))
    (testing "->post"
      (is (= 405 (:status (c/->post request-put ok))))
      (is (= 404 (:status (c/->post request-put ok not-found))))
      (is (= 200 (:status (c/->post request-post ok))))
      (is (= 200 (:status (c/->post request-post ok not-found)))))
    (testing "->delete"
      (is (= 405 (:status (c/->delete request-put ok))))
      (is (= 404 (:status (c/->delete request-put ok not-found))))
      (is (= 200 (:status (c/->delete request-delete ok))))
      (is (= 200 (:status (c/->delete request-delete ok not-found)))))))


(defn composite
  [request]
  (c/->uri request
    "/user/:id/profile/:type/" [id type] (c/->method request
                                           :get {:status 200
                                                 :body (format "Compact profile for ID: %s, Type: %s" id type)}
                                           :put {:status 200
                                                 :body (format "Updated ID: %s, Type: %s" id type)})
    "/user/:id/permissions/"   [id]      (c/->post request {:status 201
                                                          :body "Created new permission"})))


(def composite-fn
  (c/make-uri-handler
    "/user/:id/profile/:type/" (fn [request {:keys [id type]}]
                                 (c/->method request
                                   :get {:status 200
                                         :body (format "Compact profile for ID: %s, Type: %s" id type)}
                                   :put {:status 200
                                         :body (format "Updated ID: %s, Type: %s" id type)}))
    "/user/:id/permissions/"   (fn [request {:keys [id]}]
                                 (c/->post request {:status 201
                                                  :body "Created new permission"}))
    (fn [_] {:status 400
             :headers {"Content-Type" "text/plain"}
