In Ruby this sort of thing comes naturally due to its much more flexible metaprogramming features than Java-like languages. Testing frameworks like RSpec and the various Gems that go with it for building mock objects make this very easy and common, without having to restructure the original code or have a bunch of nonobvious names for a bunch of patterns.
I have nothing against Java and still take work in Java, but I think every Java developer would learn a lot from Ruby-like languages.
I have nothing against Java and still take work in Java, but I think every Java developer would learn a lot from Ruby-like languages.