         "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

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


        "should require at least one config parameter"))
  (testing "bad values"
    (is (thrown? IllegalArgumentException
          (key/encode (key/tuple-lexicoder key/integer-lexicoder) nil))
        "should not encode nil")
    (is (thrown? IllegalArgumentException
          (key/encode (key/tuple-lexicoder key/integer-lexicoder) #{123}))
        "should not encode non-sequential values")
    (is (thrown? IllegalArgumentException
