 
      (fact
       "count-by-key returns a hashmap of (K, int) pairs with the count of each key; only available on RDDs of type (K, V)"
-      (-> (f/parallelize c [["key1" 1]
-                            ["key1" 2]
-                            ["key2" 3]
-                            ["key2" 4]
-                            ["key3" 5]])
-          (f/map-to-pair identity)
+      (-> (f/parallelize-pairs c [(ft/tuple "key1" 1)
+                                  (ft/tuple "key1" 2)
+                                  (ft/tuple "key2" 3)
+                                  (ft/tuple "key2" 4)
+                                  (ft/tuple "key3" 5)])
           (f/count-by-key)) => {"key1" 2 "key2" 2 "key3" 1})
 
      (fact

     (fact
      "combine-by-key returns an RDD by combining the elements for each key using a custom
        set of aggregation functions"
      (-> (f/parallelize c [["key1" 1]
                            ["key2" 1]
                            ["key1" 1]])
          (f/map-to-pair identity)
          (f/combine-by-key identity + +)
          (f/map f/untuple)
          f/collect


     (fact
      "group-by-key"
      (-> (f/parallelize-pairs c [(ft/tuple "key1" 1)
                                  (ft/tuple "key1" 2)
                                  (ft/tuple "key2" 3)
                                  (ft/tuple "key2" 4)
                                  (ft/tuple "key3" 5)])
          f/group-by-key
          (f/map f/group-untuple)
          f/collect
