it seems this was an attempt to make this injectable for tests, but it can work by changing config variables too.