[Bug 871581] Added unit testing with mocha