Rather than blocking the tests for several seconds, you might want to mock the portion of the code checking the time, or set manually the current time during the test.