org.mockito.exceptions.base.MockitoException: Failed to mock class com.example.example.test.MockActivity

Google Groups | Phlip Plumlee | 4 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    MockitoException: Failed to mock class com.example.example.test.MainActivity

    Google Groups | 4 years ago | Phlip Plumlee
    org.mockito.exceptions.base.MockitoException: Failed to mock class com.example.example.test.MockActivity

    Root Cause Analysis

    1. org.mockito.exceptions.base.MockitoException

      Failed to mock class com.example.example.test.MockActivity

      at com.smartphins.example.test.SmartPhinsTest.test_mockito_mocks_activities()
    2. com.smartphins.example
      SmartPhinsTest.test_mockito_mocks_activities
      1. com.smartphins.example.test.SmartPhinsTest.test_mockito_mocks_activities(ExampleTest.java:39)
      1 frame
    3. Java RT
      Method.invokeNative
      1. java.lang.reflect.Method.invokeNative(Native Method)
      1 frame
    4. Android Platform
      InstrumentationTestCase.runTest
      1. android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
      2. android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
      2 frames