Method to allow mocking non-existent mehods without setting global directive