title: Do Mock objects get reset for each test?
body: <p>I'm using the <a href="http://docs.mockito.googlecode.com/hg/latest/org/mockito/Mockito.html" rel="noreferrer">Mockito framework</a> to create Mock objects in my JUnit tests.  Each mock knows what methods have been called on it, so during my tests I can write</p>
  <pre><code>verify(myMock, atLeastOnce()).myMethod();
  </code></pre>
  <p>I am wondering if this internal mock knowledge of what it has called will persist across my tests?  If it does persist, then I could be getting false positives when using the same <code>verify</code> method in two tests.</p>
  <p>A code example</p>
  <pre><code>@RunWith(MockitoJUnitRunner.class)
  public class EmrActivitiesImplTest {
      
      @Mock private MyClass myMock;
      
      @Before
      public void setup() {
          when(myMock.myMethod()).thenReturn(&quot;hello&quot;);
      }
      
      @Test
      public void test1() {
          // ..some logic
          verify(myMock, atLeastOnce()).myMethod();
      }
      
      @Test
      public void test2() {
          // ..some other logic
          verify(myMock, atLeastOnce()).myMethod();
      }  
  }
  </code></pre>
  <p>Mock state is persisted - test2 will pass regardless, since test1's verify method passed</p>
  <p>Mock state is reset - test2 will fail if myMock.myMethod() isn't called</p>