My focus was on Design Patterns, but I side-tripped to this because someone said "I don't have time here to say why Singleton is bad. If you don't know go watch this series of talks." Yak-shaving in learning?
I don't know, the ServiceLoader / Service Locator stuff is on the OCPJP exam, so I am going to make sure I know it.
Even in there, he says, well it is better than Singletons, but still complicates testability/testing...
It was non-obvious enough to me that I wanted to mention it here.
The talk is old and predates modules, but I am pretty sure the JPMS doesn't address the testability drawbacks at all.
RTFJD (the JavaDocs are your friends!) If you haven't read them in a long time, then RRTFJD (they might have changed!)
Well, I'm allergic to videos, but the reason I'd avoid ServiceLocator in testing is that in order to locate a service, the service (or at least a mockup) has to be available. Unit tests should ideally be simple, so the more complexity you need in a test environment, the worse it is.
Bjoke: A "Bully Joke". A Statement or action made with malicious intent - unless challenged. At which point it magically transforms into "I was just funnin'" or "What's the matter, can't take a joke?"