The problem with the test is that it is not a true unit test and is not isolating things. It's trying to swap out a mock into a global scope. If I were you, I'd extract "CommonEditorPlugin.getDefault().getQuickFixProcessorRegistry()" to a "protected QuickFixProcessorsRegistry getQuickFixProcessorRegistry()" method here, and then override it in the unit test to return a mock QuickFixProcessorsRegistry.

But again, I think the most important piece of this entire changeset to test is the actual QuickFixProcessorsRegistry, where you'll want to verify the core functionality of it: that is lazily loads contributions to avoid activating unused plugins; That it grabs the correct implementation given the content type; That for a null arg it returns null; etc.

As your own reply shows - the test you wrote is more of an integration level test. A true unit test is meant to test a class in isolation.