Fixed a unit test so it can be executed in different time settings.