Unit tests for trie search functionality