Standardize the use of Clock in the codebase, rather than constructs like Instant.now() which cannot be mocked easily. The Clock could be provided centrally.
Acceptance criteria
[x] No use of new Date(), Instant.now() or similar in runtime code.
[x] Single instance of Clock in shared context, also used for mocking.
[ ] ADR
Tasks
[x] Create Single instance of Clock in shared context
[x] Replace use of new Date(), Instant.now() or similar in runtime code, with shared Clock
Upstream https://github.com/eclipse-dataspaceconnector/DataSpaceConnector/issues/1364
Standardize the use of
Clock
in the codebase, rather than constructs likeInstant.now()
which cannot be mocked easily. TheClock
could be provided centrally.Acceptance criteria
new Date()
,Instant.now()
or similar in runtime code.Clock
in shared context, also used for mocking.Tasks
Clock
in shared contextnew Date()
,Instant.now()
or similar in runtime code, with sharedClock