                :conn (connect)}
           resp ((create-subject-handler path-for) req)]
       (is (= 409 (:status resp))))))
+
+;; ---- Study -----------------------------------------------------------------
 
 (deftest study-handler-test
   (letfn [(study [id] (api/study (d/db (connect)) id))

      (is (= 201 (:status resp)))
      (is (= :subject.sex/male
             (:subject/sex (api/subject (d/db (connect)) "id-171917"))))))
  (testing "Create with birth-date"
    (let [req {:request-method :post
               :params {:id "id-173133"

               :params {}
               :conn (connect)}]
      (is (= 422 (:status ((create-subject-handler nil) req))))))

  (testing "Create with invalid sex fails"
    (let [req {:request-method :post
               :params {:id "id-172029"
                        :sex "foo"}
               :conn (connect)}]
      (is (= 422 (:status ((create-subject-handler nil) req))))))

  (testing "Create with invalid birth-date fails"
    (let [req {:request-method :post
               :params {:id "id-172029"
                        :birth-date "foo"}
               :conn (connect)}]
      (is (= 422 (:status ((create-subject-handler nil) req))))))

  (testing "Create with id only"
    (let [path-for (fn [_ _ id] id)
          req {:request-method :post
