Added tests for trie functions.