make them into variables that can be mocked (cherry picked from commit 5747951cc7)
5747951cc7
db.DefaultContext
modules/mirror
services