Added support for type based mocking