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

          (key/lexicoder [:integer :bar]))
        "should not accept any config parameters"))
  (testing "bad values"
    (is (thrown? IllegalArgumentException
          (key/encode key/integer-lexicoder 0.0))
        "should not encode non-integers")

          (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) nil))
        "should not encode nil")
    (is (thrown? IllegalArgumentException
          (key/encode (key/sequence-lexicoder key/integer-lexicoder) #{123}))
        "should not encode non-sequential values")))
