Fixed mocking for virtual functions.