Added failing unit test for getLongestMatch.