We use
LocalDate.now() and
Instant.now()
in our Application. Working on Unit testing and would like to test few things with Future Date and Past date. We do change the System clock and testing this. Is it possible to do these kind of testing without Changing the system clock.
We have the following option.
LocalDate.now(Clock clock)
But, the problem is, we are using LocalDate.now() in so many places and hence changing the code is not an option.