trie: added a kvs encode/decode test.