 
   (testing "restrict handler with failure 1"
     (let [handler (restrict test-handler {:handler {:or [fail fail]}})]
-      (is (thrown? Exception (handler 1)))))
+      (is (thrown? clojure.lang.ExceptionInfo (handler 1)))))
 
   (testing "restrict handler with failure 2"
     (let [handler (restrict test-handler {:handler {:or [fail fail]}})

        (testing "with keyword as allowed method"
          (let [handler (method-handler :get)]
            (is (= (:body (handler allowed)) allowed))
            (is (thrown? Exception (handler forbidden)))))

        (testing "with set of keywords as allowed method"
          (let [handler (method-handler #{:get})]
            (is (= (:body (handler allowed)) allowed))
            (handler forbidden)
            (is (thrown? Exception (handler forbidden)))))

        (testing "with nil as allowed request method"
          (let [handler (method-handler nil)]

      (is (= {:uri "/path2"} (:body rsp)))))

  (testing "check access rules 3"
    (is (thrown? clojure.lang.ExceptionInfo (handler3 {:uri "/path3"}))))

  (testing "check access rules 4"
    (is (thrown? clojure.lang.ExceptionInfo (handler3 {:uri "/path4"}))))
)

(defn method-handler [type type-param allowed]
