Updated working of Mock library

Updated Mock library so that mocked instances can be passed strong typed
methods. For example when a method expects an instance to implement a
certain interface. This will now be mimicked by the Mocking library.