Port serialize client test cases to Mocha.