Create a function that takes method name and verify if that method was called
I would like to create a method that can take a method name and verify if method was called. I have implemented the following coed block and wanted to investigate if there is a better way to do it