         "should not accept any config parameters"))
   (testing "bad values"
     (is (thrown? IllegalArgumentException
+          (key/encode key/bytes-lexicoder nil))
+        "should not encode nil")
+    (is (thrown? IllegalArgumentException
           (key/encode key/bytes-lexicoder "foo"))
         "should not encode non-byte-arrays")
     (is (thrown? IllegalArgumentException

          (key/lexicoder [:seq :string :foo]))
        "should only accept one config parameter"))
  (testing "bad values"
    (is (thrown? IllegalArgumentException
          (key/encode (key/sequence-lexicoder key/integer-lexicoder) #{123}))
        "should not encode non-sequential values")))

        "should only accept one config parameter"))
  (testing "bad values"
    (is (thrown? IllegalArgumentException
          (key/encode key/string-lexicoder nil))
        "should not encode nil")
    (is (thrown? IllegalArgumentException
          (key/encode key/string-lexicoder 123))
        "should not encode non-strings")
    (is (thrown? IllegalArgumentException
