Unit Test Fix: Usernames with Whitespace

This patch will fix issues with running Unit tests where usernames have whitespace in them (such as on MS Platforms).
Also, a refactor on the Whitespace Regex literal (made it a constant).