Service locator is not an anti pattern.