> If you can't monkey-patch the getDate function with a mock in a testing context because your language won't allow it, that's a language smell, not a pattern smell.
Of course you can do it in Java. But it is widely considered poor practice, for good reason, and is generally avoided.
Of course you can do it in Java. But it is widely considered poor practice, for good reason, and is generally avoided.