Add unit test for language detection