void verifyExceptionCaptured(Class<? extends Throwable> expectedExceptionClass){
  assertTrue("Excpected exception not thrown",exceptionEventCapture.hasCaptured());
  Throwable caughtEx=exceptionEventCapture.getValue();
  assertEquals(expectedExceptionClass,caughtEx.getClass());
  exceptionEventCapture.reset();
}

void verifyExceptionCaptured ( Class < ? extends Throwable > expectedExceptionClass ) { assertTrue ( "Excpected exception not thrown" , exceptionEventCapture . hasCaptured ( ) ) ; Throwable caughtEx = exceptionEventCapture . getValue ( ) ; assertEquals ( expectedExceptionClass , caughtEx . getClass ( ) ) ; exceptionEventCapture . reset ( ) ; }
verify that the given exception event capture ( as returned by getandinitexceptioncapture ) has thrown an exception of the given expectedexceptionclass . resets the capture
