Port initial test cases for token middleware to Mocha.