The service locator pattern is a design pattern used in software development to encapsulate the processes involved in obtaining a service with a strong abstraction layer.
We already mention it in our article: How to develop a flexible Apex code for Salesforce.
Continue reading How to write Unit Tests with ServiceLocator