Place main code into own function
Quote output of _assertEquals()

It's easier to detect trailing spaces this way.
Add self test for replaceTokenMatch
Add self test for _replaceTokenFindMatch