text chat tests refactoring