Fixed crash in tests in gmock object.