Short answer / opinion
I do not recommend using Mockito testing for Android. The Android environment seems too complicated to taunt. The main approach for Android unit tests is to run them in an emulator. Thus, many classes of containers are already present and they do not need to be mocked.
Long answer
I am also relatively new to the world of testing Android devices. I wrote block tests on the server side for a long time and found that Mockito is one of the best tools to simplify unit testing. Mockito is very useful in mocking the behavior of complex objects. This helps break any dependencies that your code may experience under containers (for example, a servlet container or an OSGI container), or other complex employees (for example, database connection classes).
This mix works well when your containers / collaborators have well-defined interfaces.
A few months ago, I decided to try Mockito with Android development. I found that Mockito works if you have at least 1.9.5 and dexmaker. Dexmaker handles runtime byte code generation for Android Dalvik VM.
The first thing I tried in my first test was mock android.content.Context, and I found that it was HARD. At first I tried to make fun of only those methods that I called directly, but then I found that they were called in other methods that depend on the resources of the application ... Ultimately, the mockery became so complicated that it defeated the purpose of using Mockito in the first a place.
So, I gave up and started using the Android unit test helper classes (AndroidTestCase, ActivityUnitTestCase, ...). I was discouraged by the fact that now I had to rely on an emulator, which implied the execution of a SLOW test. Perhaps Mokito still has a place in this type of test. This can be useful for ridicule, such as external data sources.
In any case, this is just my 2 cents.
source share