When I run the following code:
public class ActivityTest extends ActivityInstrumentationTestCase2 {
....
public void testCanCreat
User23's answer is close to the solution that worked for me.
According to the official documentation you have to do the following things to activate Mockito in your Android app:
Add the following dependencies into your build.gradle:
androidTestCompile "org.mockito:mockito-core:1.10.19"
androidTestCompile fileTree(dir: 'libs', include: ['dexmaker-1.4.jar'])
androidTestCompile fileTree(dir: 'libs', include: ['dexmaker-mockito-1.4.jar'])