   (fact (get-in new-replica [:pairs :d]) => :a)
   (fact (get-in new-replica [:pairs :a]) => :d)
   (fact (get-in new-replica [:accepted]) => {})
-  (fact (last (get-in new-replica [:peers])) => :d)
+  (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))
 


(def rep-reactions (partial extensions/reactions entry))

(def old-replica {:pairs {} :accepted {:a :d} :peers [:a]
                  :job-scheduler :onyx.job-scheduler/greedy})

(let [new-replica (f old-replica)


(def old-replica {:pairs {:a :b :b :c :c :a}
                  :accepted {:a :d}
                  :peers #{:a :b :c}
                  :job-scheduler :onyx.job-scheduler/greedy})

(let [new-replica (f old-replica)
