   (it "should return status code 404 at the root"
     (should= 404 (:status (http-client/get "http://localhost:3000" {:throw-exceptions false}))))
 
-  (context "when no circles have been created"
-    (with response (http-client/get "http://localhost:3000/circles" {:throw-exceptions false}))
-    (it "should return an empty array"
-        (should= 200 (:status @response))
-        (should= "[]" (:body @response))))
-
-  (context "upon creating a circle"
-    (with response (http-client/post "http://localhost:3000/circles" 
-                                    {:throw-exceptions false
-                                     :content-type :json
-                                     :body (json/generate-string 
-                                             {:name "Test Circle!"
-                                              :lead-link-name "Bill"
-                                              :lead-link-email "bfinn@example.com"})}))
-    (it "should redirect"
-      (should= 303 (:status @response))
-      (should-contain "application/json" (get-in @response [:headers "Content-Type"]))
-      (should-contain #"^\/circles\/\d+" (get (json/parse-string (:body @response)) "location")))
-
-    (context "and getting the created circle"
+  (context "circles"
+    (context "when no circles have been created"
+      (with response (http-client/get "http://localhost:3000/circles" {:throw-exceptions false}))
+      (it "should return an empty array"
+          (should= 200 (:status @response))
+          (should= "[]" (:body @response))))
+  
+    (context "when creating a circle"
+      (with response (http-client/post "http://localhost:3000/circles" 
+                                      {:throw-exceptions false
+                                       :content-type :json
+                                       :body (json/generate-string 
+                                               {:name "Test Circle!"
+                                                :lead-link-name "Bill"
+                                                :lead-link-email "bfinn@example.com"})}))
+      (it "should redirect"
+        (should= 303 (:status @response))
+        (should-contain "application/json" (get-in @response [:headers "Content-Type"]))
+        (should-contain #"^\/circles\/\d+" (get (json/parse-string (:body @response)) "location")))
+  
+      (should-return-400 "with invalid paramaters" 
+                         (json/generate-string {:foo "Test Circle!"})
+                         "IllegalArgumentException")
+      (should-return-400 "with missing paramaters" 
+                         (json/generate-string {:name "Test Circle!"})
+                         "IllegalArgumentException")
+      (should-return-400 "with malformed JSON" 
+                         "{\"name\" :: \"Bill\""
+                         "IOException"))
+  
+    (context "when creating and retrieving the created circle"
       (with location (get (json/parse-string 
                             (:body (http-client/post 
                                      "http://localhost:3000/circles" 

          (should= 200 (:status @get-response))
          (should= {"lead-link" {"email" "bfinn@example.com"
                                 "name" "Bill" } "name" "Test Circle!"} 
                   (json/parse-string (:body @get-response))))))

  (context "upon creating a circle"
    (should-return-400 "with invalid paramaters" 
                       (json/generate-string {:foo "Test Circle!"})
                       "IllegalArgumentException")
    (should-return-400 "with missing paramaters" 
                       (json/generate-string {:name "Test Circle!"})
                       "IllegalArgumentException")
    (should-return-400 "with malformed JSON" 
                       "{\"name\" :: \"Bill\""
                       "IOException")))

                                     :body circle-content}))
    (it "should return a bad request"
      (should= 400 (:status @response))
      (should-contain response-content (:body @response)))))

(describe "governance rest api"
  (before-all (r/start-test-server))
