Made it possible to use a function as a mock