             (is (= (read-string (:body response)) params)))
           (let [response (http-get (str "http://localhost:10000/hello-proxy" query))]
             (is (= (:status response) 200))
-            (is (= (read-string (:body response)) params))))))))
+            (is (= (read-string (:body response)) params))))))
+
+    (testing "redirect test with proxy"
+      (with-target-and-proxy-servers-redirect
+        {:target                {:host "0.0.0.0"
+                                 :port 9000}
+         :proxy                 {:host "0.0.0.0"
+                                 :port 10000}
+         :proxy-config          {:host "localhost"
+                                 :port 9000
+                                 :path "/redirect"}
+         :ring-handler-target   test-handler
+         :ring-handler-redirect redirect-test}
+        (let [response (http-get (str "http://localhost:9000/hello"))]
+          (is (= (:status response) 200))
+          (is (= (:body response) "Hello, World!")))
+        (let [response (http-get (str "http://localhost:9000/redirect"))]
+          (is (= (:status response) 200))
+          (is (= (:body response) "Hello, World!")))
+        (let [response (http-get (str "http://localhost:10000/hello-proxy"))]
+          (is (= (:status response) 200))
+          (is (= (:body response) "Hello, World!")))))))

         target-webserver#
         ~ring-handler
         "/hello"))
     (with-app-with-config proxy-app#
       [jetty9-service]
       {:webserver ~proxy}

                                           ((:headers req) "cookie"))}
    {:status 404 :body "D'oh"}))

(defn test-handler
  [req]
  {:status 200
   :body   "Hello, World!"})

(defn redirect-test
  [req]
  {:status  302
   :headers {"Location" "http://localhost:9000/hello"}
   :body    ""})

(defmacro with-target-and-proxy-servers
  [{:keys [target proxy proxy-config proxy-opts ring-handler]} & body]
  `(with-app-with-config proxy-target-app#
