Instead of mocking this class, just provide own abtraction for Base64
a
Adam Kirk
04/10/2019, 2:26 AM
??? Not sure I understand the error I get is
```
Adam Kirk
04/10/2019, 2:26 AM
java.lang.RuntimeException: Method decode in android.util.Base64 not mocked. See http://g.co/androidstudio/not-mocked for details.
at android.util.Base64.decode(Base64.java)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
g
gildor
04/10/2019, 2:28 AM
Yes, because you use framework class in unit tests
gildor
04/10/2019, 2:29 AM
There are few different workarounds for this, such as add Base64 implementation to your project and do not use framework, abstract this API