Port authenticate middleware test cases to mocha.
Port authenticate middleware test cases to mocha.
Port authenticate middleware test cases to mocha.