Port authorization test cases to Mocha.
Clarify error message.