 (ns onyx.log.accept-join-cluster-test
   (:require [onyx.extensions :as extensions]
             [onyx.log.entry :refer [create-log-entry]]
+            [clojure.set :as s]
             [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 (last (get-in new-replica [:peers])) => :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)
