# Using Mockito 2.x on Android

DevFeed: [Using Mockito 2.x on Android](<https://devfeed.tech/articles/using-mockito-2-x-on-android-28653.md>)

Original publisher: [Read original article](<https://jeroenmols.com/blog/2017/01/17/mockitoandroid/>)

Author: info@jeroenmols.com (Jeroen Mols)

Published: 2017-01-17T00:00:00Z

Content type: tutorial

Language: en

Sources: [Jeroen Mols](<https://devfeed.tech/sources/jeroen-mols.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [2](<https://devfeed.tech/tags/2.md>), [android](<https://devfeed.tech/tags/android.md>), [blogs](<https://devfeed.tech/tags/blogs.md>), [dependencies](<https://devfeed.tech/tags/dependencies.md>), [instrumentation](<https://devfeed.tech/tags/instrumentation.md>), [mockito](<https://devfeed.tech/tags/mockito.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

## AI overview

This tutorial explains how Mockito 2.x added native support for Android instrumentation tests. It describes replacing the earlier dependency-based approach with the mockito-android artifact and notes behavior changes involving null values and matchers.

## Source excerpt

The Mockito team is on fire lately! Not only did they add support to mock final classes and methods, but now they allow running Mockito directly onto an actual Android device.