c # mock setup return null code example Example: moq setup returns null unitOfWork.Setup(m => m.PhysicalTests).Returns((IRepository)null);