When I mock Configuration
I get an exception that I do not get when mocking other classes such as Resources.
Configuration configuration = mock(Configuration.class);
org.mockito.exceptions.base.MockitoException:
ClassCastException occurred while creating the mockito proxy :
class to mock : 'android.content.res.Configuration', loaded by classloader : 'org.robolectric.internal.bytecode.InstrumentingClassLoader@57fffcd7'
created class : 'android.content.res.Configuration$$EnhancerByMockitoWithCGLIB$$78c79839', loaded by classloader : 'org.mockito.internal.creation.util.SearchingClassLoader@e344ad3'
proxy instance class : null
instance creation by : ObjenesisInstantiator
You might experience classloading issues, disabling the Objenesis cache *might* help (see MockitoConfiguration)
I'm not super familar with mockitoi, can anyone advise me how I can properly mock the Configuration
class?