Added a method for listening to method calls.

* Added listeners for method calls to the mock class.