       (is (= '(:leader :follower :follower) (fields-by-id s :type)))
       (is (= (list {:dst (s-at 1) :type :append-entries :src (s-at 0)
                     :body {:term 1 :leader-id (s-at 0)
-                           :prev-log-index 0 :prev-log-term 0
-                           :entries [] :leader-commit 0}}
+                           :prev-log-index 1 :prev-log-term 0
+                           :entries [{:term 1, :cmd {:op :noop}}] :leader-commit 0}}
                    {:dst (s-at 2) :type :append-entries :src (s-at 0)
                     :body {:term 1 :leader-id (s-at 0)
-                           :prev-log-index 0 :prev-log-term 0
-                           :entries [] :leader-commit 0}})
+                           :prev-log-index 1 :prev-log-term 0
+                           :entries [{:term 1, :cmd {:op :noop}}] :leader-commit 0}})
              (sort-by :dst (:tx-queue (srv s (s-at 0))))))
       (is (= {(s-at 2) 0 (s-at 1) 0} (:match-index (srv s (s-at 0)))))
-      (is (= {(s-at 2) 1 (s-at 1) 1} (:next-index (srv s (s-at 0)))))))
+      (is (= {(s-at 2) 2 (s-at 1) 2} (:next-index (srv s (s-at 0)))))))
 
   (testing "step 4 - process heart beat responses"
     (let [s (->> (test-cluster 3)
                  (step-times 0 4))]
       (is (= (list {:dst (s-at 0) :src (s-at 1) :type :append-entries-response
-                :body {:term 1 :success true :count 0}}) (:tx-queue (srv s (s-at 1)))))
+                :body {:term 1 :success true :count 1}}) (:tx-queue (srv s (s-at 1)))))
       (is (= (list {:dst (s-at 0) :src (s-at 2) :type :append-entries-response
-                :body {:term 1 :success true :count 0}}) (:tx-queue (srv s (s-at 2)))))))
+                :body {:term 1 :success true :count 1}}) (:tx-queue (srv s (s-at 2)))))))
   (testing "step 5 - heart beat response"
     (let [s (->> (test-cluster 3)
                  (step-times 0 5))]
-      (is (= {(s-at 2) 0 (s-at 1) 0} (:match-index (srv s (s-at 0)))))))
+      (is (= {(s-at 2) 2 (s-at 1) 2} (:match-index (srv s (s-at 0)))))))
 
 
   (testing "step 7 wait for commit index"

      (is (= '(:candidate :follower :follower) (fields-by-id s1 :type)))
      (is (= '(1 0 0) (fields-by-id s1 :current-term)))
      (is (= '({:dst "1.localnet:1" :src "0.localnet:0" :type :request-vote
                :body {:term 1 :candidate-id "0.localnet:0", :prev-log-index 0
                       :prev-log-term 0}}
               {:dst "2.localnet:2" :src "0.localnet:0" :type :request-vote
                :body {:term 1 :candidate-id "0.localnet:0", :prev-log-index 0
                       :prev-log-term 0}}) (sort-queue (:tx-queue (get (:servers s1) (s-at 0))))))))
  (testing "step 2 - peers respond to request vote"
    (let [s2 (->> (test-cluster 3)


  (testing "1 - 2 vote"
    (let [s (create-and-elect)]
      (println s)
      (is (= '(:leader :follower :follower) (fields-by-id s :type)))

      (is (= '(2 2 2) (fields-by-id s :commit-index))))))

(defn sort-queue [q]
  (sort-by :dst q))
