Mock function call to make function work