           (t/kv-pairs= pairs (read-etap-with-flow dpath)) => true)))))
 
 ;; Example of how to do stuff now.
-(def spec
-  (DomainSpec. (JavaBerkDB.)
-               (HashModScheme.)
-               4))
 
 (defn populate [root idx]
-  (with-open [shard (.createShard spec root idx)]
+  (with-open [shard (.createShard (kv-spec 4) root idx)]
     (doseq [x (range 1000)]
       (.index shard (KeyValDocument. x 10)))))
 
 ;; or, you can create a domain store directly:
+
 (defn store []
   (test/with-fs-tmp [_ tmp]
     (DomainStore. tmp (DomainSpec. (JavaBerkDB.)

(ns elephantdb.cascading.integration-test
  (:use midje.sweet
        elephantdb.test.common
        [clojure.string :only (join)])
  (:require [elephantdb.test.keyval :as t]
            [hadoop-util.test :as test])
  (:import [cascading.pipe Pipe]
           [cascading.tuple Fields Tuple]
           [cascading.flow FlowConnector]

          data2 {0 (barr 1)
                 10 (barr 100)}]
      (fill-domain sink data)
      (tuple-seq sink) => (just (seq data) :in-any-order)
      (fill-domain sink data2)
      (tuple-seq sink) => (just (conj (seq data2) [(barr 1) nil]) :in-any-order))))

;; TODO: Invalid. Doesn't belong in this project; this makes far too
;; many assumptions about a thrift interface, etc. All we're concerned
