title: Android mock Camera
body: <p>Is it possible to mock the Android Camera class ?</p>
  
  <pre><code>@Override
  public void setUp() {
      _camera = Mockito.mock(Camera.class);
  }
  </code></pre>
  
  <p>fails to generate a mock (<code>ExceptionInitializerError</code> in Mockito's <code>createProxyClass</code>).</p>
  
  <p>Should I create some kind of wrapper around the <code>Camera</code> (not my favorite solution, would really like to just mock the class...)?</p>
  
  <p>Or, should I use a different mock library then Mockito?</p>
  
  <p>Hope somebody can point me in the right direction.</p>
  
  <p>Complete stacktrace of <code>ExceptionInitializerError</code></p>
  
  <pre><code>java.lang.ExceptionInInitializerError
  at org.mockito.internal.creation.jmock.ClassImposterizer.createProxyClass(ClassImposterizer.java:85)
  at org.mockito.internal.creation.jmock.ClassImposterizer.imposterise(ClassImposterizer.java:62)
  at org.mockito.internal.creation.jmock.ClassImposterizer.imposterise(ClassImposterizer.java:56)
  at org.mockito.internal.creation.CglibMockMaker.createMock(CglibMockMaker.java:23)
  at org.mockito.internal.util.MockUtil.createMock(MockUtil.java:26)
  at org.mockito.internal.MockitoCore.mock(MockitoCore.java:51)
  at org.mockito.Mockito.mock(Mockito.java:1243)
  at org.mockito.Mockito.mock(Mockito.java:1120)
  at com.cleancode.lifesaver.flashlight.test.FlashLightTests.setUp(FlashLightTests.java:20)
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
  at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
  at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
  at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1661)
  Caused by: java.lang.VerifyError: org/mockito/cglib/core/ReflectUtils
  at org.mockito.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:167)
  at org.mockito.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
  at org.mockito.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:217)
  at org.mockito.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
  at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:117)
  at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:109)
  at org.mockito.cglib.core.KeyFactory.create(KeyFactory.java:105)
  at org.mockito.cglib.proxy.Enhancer.&lt;clinit&gt;(Enhancer.java:70)
  ... 18 more
  </code></pre>