     self))
 
 (defn- mock-status-system [response]
-  (c/system-map
-    :config (configuring/new-config {})
-    :metering (c/using
-                (metering/new-metering)
-                [:config])
-    :routes (routes/new-routes)
-    :app-status (c/using (app-status/new-app-status) [:config :routes])
-    :mock-status (c/using (map->MockStatusSource {:response response}) [:app-status])))
-
+  (assoc (serverless-system {})
+    :mock-status
+    (c/using (map->MockStatusSource {:response response}) [:app-status])))
 
 (deftest ^:unit should-show-applicationstatus
   (u/with-started [started (mock-status-system {:mock {:status  :ok

            [de.otto.tesla.stateful.routes :as rts]
            [ring.mock.request :as mock]))

(defn- test-system [runtime-config]
  (dissoc
    (system/empty-system runtime-config)
    :server))

(deftest ^:unit should-have-system-status-for-runtime-config
  (u/with-started [system (test-system {:host-name "bar" :host-port "0123"})]
                  (let [status (:app-status system)
                        system-status (:system (app-status/status-response-body status))]
                    (is (= (:hostname system-status) "bar"))


(deftest ^:integration should-serve-status-under-configured-url
  (testing "use the default url"
    (u/with-started [started (serverless-system {})]
                    (let [handlers (rts/routes (:routes started))]
                      (is (= (:status (handlers (mock/request :get "/status")))
                             200)))))

  (testing "use the configuration url"
    (u/with-started [started (serverless-system {:status-url "/my-status"})]
                    (let [handlers (rts/routes (:routes started))]
                      (is (= (:status (handlers (mock/request :get "/my-status")))
                             200)))))

  (testing "default should be overridden"
    (u/with-started [started (serverless-system {:status-url "/my-status"})]
                    (let [handlers (rts/routes (:routes started))]
                      (is (= (handlers (mock/request :get "/status"))
                             nil))))))

(deftest should-add-version-properties-to-status
  (testing "it should add the version properties"
    (u/with-started [started (serverless-system {})]
                    (let [handlers (rts/routes (:routes started))
                          response (mock/request :get "/status")
                          status-map (json/read-json (:body (handlers response)))]
