             [onyx.system :as system]
             [onyx.extensions :as ext]
             [onyx.api]
-            [onyx.types :refer [map->Leaf]]
+            [onyx.types :refer [map->Leaf map->Ack]]
             [com.stuartsierra.component :as component]
             [onyx.test-helper :refer [load-config]]
             [com.gfredericks.test.chuck :refer [times]]

                :payload 
                (gen/such-that not-empty 
                               (gen/vector 
                                 (gen/hash-map 
                                   :id uuid-gen
                                   :completion-id uuid-gen
                                   :ack-val gen/int)))))

(def gen-completion
  (gen/hash-map :command 

(def gen-command
  (gen/one-of [gen-messages gen-acks gen-completion gen-retry]))

(deftest messenger-gen-test 
  (let [peer-group (onyx.api/start-peer-group peer-config)] 
    (try 
      (checking "all generated messages are received"
                (times 20)
                [commands (gen/vector gen-command)]
                (let [grouped-model (group-by :command commands) 
                      model-results (zipmap (keys grouped-model)
                                            (map (fn [v] (set (flatten (map :payload v)))) 
