defines mock() in the module scope