Glossary: Software Design Patterns in Java
Clock (injected clock)
Also written: injected clock, Supplier<Instant>
A `Supplier<Instant>` passed into code that needs the time. A test passes a fixed time and `main` passes the real `Instant::now`.
Glossary: Software Design Patterns in Java
Also written: injected clock, Supplier<Instant>
A `Supplier<Instant>` passed into code that needs the time. A test passes a fixed time and `main` passes the real `Instant::now`.