Inject a mock implementation in place of any node.js module for easy unit tests.