             [manifold.deferred :as dfrd]
             [manifold.stream :as strm])
   (:import io.netty.buffer.Unpooled))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Helper functions
 
 ;;;; TODO: Consolidate these next 2 to eliminate duplication
 (defn srvr->client-consumer

                                       "Sending a" (class bs) "to server's parent")
                             (let [sent (strm/try-put! server->client bs time-out ::timed-out)]
                               (is (not= @sent ::timed-out))))
          server-child-cb (fn [bs]
                            (let [prelog (utils/pre-log "Server's child callback")
                                  incoming (edn/read-string (String. bs))
                                  _ (log/debug prelog
                                               (str "Matching '" incoming
                                                    "', a " (class incoming)) )
                                  rsp (condp = incoming
                                        ::ohai! ::orly?
                                        ::yarly ::kk
                                        ::icanhazchzbrgr? ::kk
                                        ::kthxbai ::kk
                                        ::specs/normal ::specs/normal)]
                              (log/info prelog
                                        "Server received"
                                        incoming
                                        "\nwhich triggers"
                                        rsp)
                              (if (not= rsp ::specs/normal)
                                (let [actual (.getBytes (pr-str rsp))]
                                  (m-t/try-multiple-sends message/child->!
                                                          prelog
                                                          5
                                                          @server-atom
                                                          actual
                                                          "Message buffered to child"
                                                          "Giving up on forwarding to child"
                                                          {::response rsp
                                                           ::request incoming}))
                                (message/close! @server-atom))
                              (when (= incoming ::icanhazchzbrgr?)
                                ;; One of the main points is that this doesn't need to be a lock-step
                                ;; request/response.
                                (log/info prelog "Client requested chzbrgr. Send out of lock-step")
                                (let [chzbrgr (byte-array (range cheezburgr-length))]
                                  (m-t/try-multiple-sends message/child->!
                                                          prelog
                                                          5
                                                          @server-atom
                                                          chzbrgr
                                                          "Buffered chzbrgr to child"
                                                          "Giving up on sending chzbrgr"
                                                          {})))))]
      (dfrd/on-realized succeeded?
                        (fn [good]
                          (log/info "----------> Test should have passed <-----------"))

          ;; Although this *does* take me back to the beginning, where
          ;; I was trying to figure out ways to gen the tests based upon
          ;; a protocol defined by something like spec.
          chzbrgr-length 182
          client-child-cb (partial mock-client-child client-atom client-state succeeded? chzbrgr-length)

          server-atom (atom nil)
          server-parent-cb (fn [bs]
