Switched to a new way of mocking with type hints.