Improved onToken tests.