Our systems generally rely on a (dependency injected) &#x27;currentDateTimeService&#x27;. In unit-tests, the currentDateTimeService is dependency-injected with a mock service, always returning the same date.<p>But here, I guess the better solution would be to fix the tested code: don&#x27;t gracefully fall-back, but fail fast. I&#x27;ve seen too many places where graceful defaulting code ended up corrupting important data.