title: Mockito can't mock an interface?
body: <p>I'm having difficulties understanding how to mock/stub an interface with Mockito.</p>
  
  <p>This simple scenario...</p>
  
  <pre><code>public interface Adder
  {
      int add(int a, int b);
  }
  
  public class Calculator
  {
      Adder _adder;
  
      public Calculator(Adder adder)
      {
          _adder = adder;
      }
  
      public int add(int a, int b)
      {
          return _adder.add(a, b);
      }
  }
  
  public class MockitoTester
  {
      @Test
      public void can_mock()
      {
          Adder adder = mock(Adder.class);
          Calculator sut = new Calculator(adder);
          assertThat(sut).isNotNull();
      }
  }
  </code></pre>
  
  <p>Is giving me this error...</p>
  
  <pre><code>java.lang.NoClassDefFoundError: net/bytebuddy/dynamic/scaffold/subclass/ConstructorStrategy
      at org.mockito.internal.creation.bytebuddy.CachingMockBytecodeGenerator.&lt;init&gt;(CachingMockBytecodeGenerator.java:20)
      at org.mockito.internal.creation.bytebuddy.ByteBuddyMockMaker.&lt;init&gt;(ByteBuddyMockMaker.java:22)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
      at java.lang.Class.newInstance(Class.java:442)
      at org.mockito.internal.configuration.plugins.PluginLoader.loadPlugin(PluginLoader.java:33)
      at org.mockito.internal.configuration.plugins.PluginRegistry.&lt;init&gt;(PluginRegistry.java:12)
      at org.mockito.internal.configuration.plugins.Plugins.&lt;clinit&gt;(Plugins.java:11)
      at org.mockito.internal.util.MockUtil.&lt;clinit&gt;(MockUtil.java:23)
      at org.mockito.internal.MockitoCore.&lt;init&gt;(MockitoCore.java:44)
      at org.mockito.Mockito.&lt;clinit&gt;(Mockito.java:1101)
      at com.jnericks.testutils.MockitoTester.can_mock(MockitoTester.java:13)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
      at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
      at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
  Caused by: java.lang.ClassNotFoundException: net.bytebuddy.dynamic.scaffold.subclass.ConstructorStrategy
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 40 more
  </code></pre>