Port aes tests from common.js to mocha.