   (checking
    "The matching flow condition limits the downstream selection"
    (times 50)
-   [[downstream flow-to] gen-tasks-and-subset]
+   [fcs (gen/vector (->> :a
+                         (flow-condition-gen)
+                         (flow-to-tasks-gen)
+                         (true-flow-condition-gen))
+                    1)
+    other-downstream-tasks (gen/vector gen/keyword)]
    (let [task :a
-         fcs [{:flow/from task
-               :flow/to flow-to
-               :flow/predicate ::true-pred}]
+         target-tasks (mapcat :flow/to fcs)
+         downstream (into other-downstream-tasks target-tasks)
          compiled (c/compile-fc-norms fcs task)
          results
          (t/route-data
           {:onyx.core/compiled-norm-fcs compiled} nil nil fcs downstream)]
-     (is (= (into #{} flow-to) (:flow results)))
+     (is (= (into #{} target-tasks) (:flow results)))
      (is (nil? (:action results))))))
 
 (deftest conj-downstream-tasks-together


(def false-pred (constantly false))

(def gen-tasks-and-subset
  "Returns a vector of two elements.
   The first represents a seq of downstream
   tasks, and the second represents a subset
   of that seq."
  (gen/bind
   (gen/vector gen/keyword)
   (fn [downstream]
     (gen/bind
      (gen/choose 0 (count downstream))
      (fn [size]
        (gen/bind
         (gen/shuffle (take size downstream))
         (fn [flow-to]
           (gen/return [downstream flow-to]))))))))

(deftest nil-flow-conditions
  "No flow condition routes to all downstream tasks"

          {:onyx.core/compiled-norm-fcs compiled} nil nil flow-conditions downstream)]
     (is (= (into #{} (mapcat :flow/to flow-conditions)) (:flow results)))
     (is (nil? (:action results))))))



