Fix unit test to not fail when executed at the end of the day