@baldur usually I try to avoid mocking the class under test at all costs. Then how do you know you are really testing the production code? Hopefully we can get rid of this once we have a proper ShadowPreferenceFragment.