             [authenticator])))))))
 
 ;; Resource test
+;; TODO: Combine authentcate with authorize
+
 
 ;; Integration test
 
-#_(deftest basic-auth-test
+(deftest basic-auth-test
   (let [resource
         {:methods {:get {:produces {:media-type "application/edn"}
                          :response (fn [ctx] "OK")}}}]

    (let [resource
          (assoc
           resource
           :yada.auth/authenticators
           [(basic/http-basic-authenticator
             (fn [ctx user password attributes]
               (future

                            {:headers {"authorization"
                                       (format "BASIC %s" (encode-basic-authorization-token "alice" "pa$$w0rd"))}})]
              (is (= 401 (:status response)))
              (is (= "Basic charset=\"UTF-8\", realm=\"WallyWorld\""
                     (get-in response [:headers "www-authenticate"]))))))

      (testing "forbidden when good credentials"
          (let [resource (assoc
                          resource
                          :authorize (fn [ctx creds] nil)
