Unit testing time-bound code
- by maasg
I'm currently working on an application that does a lot of time-bound operations. That is, based on long now = System.currentTimeMillis();, and combined with an scheduler, it will calculate periods of time that parametrize the execution of some operations. e.g.:
public void execute(...) { // executed by an scheduler each x minutes
final int…