Mocha testing implementation