   )
 
 (defn sub-component [sub-component cursor]
-  (fn [component]
+  (fn -sub-component-pred [component]
     (let [expected-name (component-name sub-component)
-          actual-name (component-name (:sub-component component))]
+          actual-name (component-name (:sub-component component))
+          actual-component @(:cursor component)]
       (cond
        (not= sub-component (:sub-component component))
        {:msg "sub-component does not match"
         :expected expected-name :actual actual-name}
 
-       (not= cursor (:cursor component))
+       (not= cursor actual-component)
        {:msg (str "sub-component cursor does not match for " expected-name)
-        :expected cursor :actual (:cursor component)}
+        :expected cursor :actual actual-component}
 
        :else true
        )

      )
    )
  )


(defn -instrument [sub-component cursor _]
  {:sub-component sub-component
   :cursor cursor}
  )

(defn test-predicates
