Writing a macro for mocking functions.