@After public final void verifyMocks(){
  if (!mocks.isEmpty() || !mockControls.isEmpty()) {
    assertTrue("Created mocks have not been set to replay. Call replayMocks " + "within the test",mocksReplayed);
    if (usePowerMock) {
      PowerMock.verifyAll();
    }
 else {
      EasyMock.verify(mocks.toArray());
    }
    for (    IMocksControl mockControl : mockControls) {
      mockControl.verify();
    }
  }
}

@ After public final void verifyMocks ( ) { if ( ! mocks . isEmpty ( ) || ! mockControls . isEmpty ( ) ) { assertTrue ( "Created mocks have not been set to replay. Call replayMocks " + "within the test" , mocksReplayed ) ; if ( usePowerMock ) { PowerMock . verifyAll ( ) ; } else { EasyMock . verify ( mocks . toArray ( ) ) ; } for ( IMocksControl mockControl : mockControls ) { mockControl . verify ( ) ; } } }
verify all registered mocks this method is called automatically at the end of a test . nevertheless , it is safe to also call it beforehand , if this better meets the verification part of a test .
