Each of these things prevents isolated testing of dependent components. For that reason alone they are nonstarters.
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.