I was just wondering, what's the best way to test a JavaEE6 timer? For example, I have a job that runs every end of the month, or end of week :-?
Thanks.
The same way you would test anything time-based: adjust your system clock, or test that the expected timeout looks reasonable (e.g., check that getNextTimeout
returns a reasonable value).