Fix ToMock implementation