title: Simple Mockito verify works in JUnit but not Spock
body: <p>Using the most basic example from <a href="http://docs.mockito.googlecode.com/hg/org/mockito/Mockito.html">Mockito's examples page</a>, I am able to run successfully in JUnit.  </p>
  
  <p>However, when I run the same test in Spock, it fails.</p>
  
  <p><strong>JUnit/Java version (this passes):</strong></p>
  
  <pre><code>import org.junit.Test;
  
  import java.util.List;
  
  import static org.mockito.Mockito.mock;
  import static org.mockito.Mockito.verify;
  
  public class SimpleJunitTest
  {
      @Test
      public void basicMockTest()
      {
          List mockedList = mock(List.class);
  
          //using mock object
          mockedList.add("one");
          mockedList.clear();
  
          //verification
          verify(mockedList).add("one");
          verify(mockedList).clear();
      }
  }
  </code></pre>
  
  <p><strong>Spock/Groovy version (this fails):</strong></p>
  
  <pre><code>import static org.mockito.Mockito.mock
  import static org.mockito.Mockito.verify
  
  
  class SimpleSpockTest extends spock.lang.Specification
  {
      def "Basic Mock Test"()
      {
          given:
              //mock creation
              List mockedList = mock(List.class);
  
          when:
              //using mock object
              mockedList.add("one");
              mockedList.clear();
  
          then:
              //verification
              verify(mockedList).add("one");
              verify(mockedList).clear();
      }
  
  }
  </code></pre>
  
  <p>Here is the error I get when the Spock Test fails:</p>
  
  <pre><code>Condition not satisfied:
  
  verify(mockedList).add("one")
  |      |           |
  |      |           false
  |      $java.util.List$$EnhancerByMockitoWithCGLIB$$172e393a@613043d2 (renderer threw    
  NullPointerException)
  $java.util.List$$EnhancerByMockitoWithCGLIB$$172e393a@613043d2 (renderer threw 
  NullPointerException)
  
  at SimpleSpockTest.Basic Mock Test(SimpleSpockTest.groovy:25)
  </code></pre>
  
  <p>Any ideas or suggestions?  I really like Spock and Mockito and am hoping to get them working well together.  Thank you very much!</p>