f2prateek / rx-preferences

Reactive SharedPreferences for Android
http://f2prateek.com/2015/10/05/rx-preferences/
Apache License 2.0
1.54k stars 132 forks source link

unit testing with rxPreference #133

Open AshokSennanOkCredit opened 4 years ago

AshokSennanOkCredit commented 4 years ago

while writing unit testing, I cannot return the rxPreference.getString() as Preference since RealPreference() class is the only class which implements Preference that too final class.

org.mockito.exceptions.misusing.WrongTypeOfReturnValue: String cannot be returned by getString() getString() should return Preference

how to return the Preference in junit