The FAQ requires that you are posting real code. But yours does not appear to be real code from your project.
If we look at your code:
Code is given without a class or function
GoodClass goodClass = new GoodClass(ohterClassMock);
GoodClass and otherClassMock seems to fake placeholder names
...
A section of code has been elided.
var contracts = new List<Contract>();
var contract = new Contract{ Id = 1, Param2 = 34 };
Param2 appears be a fake name
contracts.Add(contract);
var contract2 = new Contract { Id = 2, Param2 = 56 };
contracts.Add(contract2);
The fact that you are constructing objects like this strongly suggests its not production code. It could be a unit test or something
goodClass.DoSomething(contracts);
DoSomething looks to be a fake name
ohterClassMock.Verify(mock => mock.MethodToTest(It.IsAny<?contracts?>()));
MethodToTest
is another placehold name. Is <?contracts?>
real code? I don't use C# so I'm not sure.
So you've clearly not shown us your real code as required by the FAQ. If you want to us to help improve your code, you need show us your code. If you just want a specific abstract question answered, then its not on-topic here.