For service directory lookup, global variable is fine. For global scope queue, global variable is fine. For global scope logging service, global variable is fine.
globalvar = new NopImpl()
works fine for testing. If you squint, you can even think of dependency injection frameworks like Dagger as a lot of boilerplate around a global database of instantiations.