Mockito on Android, Context.getString(id) and NullPointerException
This code should be the first line of Your test:
doReturn("Sample Hello world string")
.when(mMockContext)
.getString(any(Integer.class));
A stubbing of a method is needed