          (test-stream-intervals (throttle 3 2)
                                 [{:state "1"} 0
                                  {:state "2"} 0
-                                 {:state "3"} 1       ; t = 0 
+                                 {:state "3"} 1       ; t = 0
                                  {:state "4"} 1       ; t = 1
                                  {:state "5"} 1       ; t = 2
                                  {:state "expired"} 0 ; t = 3

            {:service "bar" :state "expired"}]
           [[{:service "foo" :state "ok"}
             nil]
            [{:service "foo" :state "ok"} 
             {:service "bar" :state "ok"}]
            [{:service "foo" :state "ok"} 
             {:service "bar" :state "expired" :time 0}]
            [{:service "foo" :state "expired" :time 0}
             nil]
            [nil 
             {:service "bar" :state "expired" :time 0}]])

         ; Expiration test: expires own events when the time comes.

                         (fn [e] (dosync (alter output conj e))))
               metrics [0.5 1 1.5 2 2.5]
               expect [2 2.5]]

           (doseq [m metrics] (r {:metric m}))
           (is (= expect (vec (map (fn [s] (:metric s)) (deref output))))))))

