It ought to be the norm, and it is (slowly) getting there. For example, the .NET 8 standard library now has a TimeProvider type to allow test frameworks to provide substitute implementations of the system clock.
related: https://docs.oracle.com/en/java/javase/21/docs/api/java.base...