Added tests for ReplaceFirstWithEscape