refactor highlightUserMentionIn
add test for refactored method