Skip to content

Conversation

@unprolix
Copy link
Collaborator

Summary

  • Replace MustBe.object() with MustBe.instanceOf(value, IntfTimeSource)
  • Validates that non-null timeSource values implement the IntfTimeSource interface
  • Matches the pattern used in TokenBucket

Test plan

  • Pass valid IntfTimeSource implementation, verify accepted
  • Pass StdTimeSource.INSTANCE explicitly, verify accepted
  • Pass plain object without required methods, verify rejected with descriptive error
  • Pass null, verify StdTimeSource.INSTANCE is used (existing behavior preserved)
  • Existing tests pass
  • Linter passes

Use MustBe.instanceOf() to validate that non-null timeSource values
implement IntfTimeSource, matching the pattern used in TokenBucket.
@unprolix unprolix force-pushed the jjb-timesource-interface-check branch from 2d1ed3e to 8fffbb8 Compare January 12, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants