Extract common testing token provider
Mark function const
Fix brace position
Remove unneeded header