Unit test for text_analyzer