What i'm trying to achieve is to return a time that is not the system time returned by System.currentTimeMillis method. So i have a time returned by some api and i must return it when system.currentTimeMillis() is called.
As not all code is under my control, i cannot use Clock interface for example and other. (for example some lib that called system are not under my control).
I found an old issue, but i have few questions as i'm trying to override the system class.
So, Should i override entire system class and provide my own implementation of system ?
Could java.lang.System and an other implementation cohabit ?
Does i need to had something else to java command (options) ...
As you can see i'm a little bit stuck.
Thanks by advance for your help.