Dependency inversion: how to mock time in tests?