 
 (def old-replica {:pairs {:a :b :b :c :c :a}
                   :accepted {:a :d}
-                  :peers [:a :b :c]
+                  :peers #{:a :b :c}
                   :job-scheduler :onyx.job-scheduler/greedy})
 
 (let [new-replica (f old-replica)

(ns onyx.log.accept-join-cluster-test
  (:require [onyx.extensions :as extensions]
            [onyx.log.entry :refer [create-log-entry]]
            [onyx.system]
            [midje.sweet :refer :all]))


  (fact (get-in new-replica [:pairs :d]) => :a)
  (fact (get-in new-replica [:pairs :a]) => :d)
  (fact (get-in new-replica [:accepted]) => {})
  (fact (s/difference (get-in new-replica [:peers])
                      (:peers old-replica)) 
        => #{:d})
  (fact diff => {:observer :a :subject :d})
  (fact (rep-reactions old-replica new-replica diff {}) => nil))

