I need to test a function that whose result will depend on current time (using Joda time\'s isBeforeNow(), it so happens).
isBeforeNow()
public boolean isAvai
Java 8 introduced the abstract class java.time.Clock which allows you to have an alternative implementation for testing. This is exactly what Jon suggested in his answer back then.