public void testGetCheckedUntimed_withGoodAndBadExceptionConstructor() throws Exception { try { getChecked(FAILED_FUTURE_CHECKED_EXCEPTION, ExceptionWithGoodAndBadConstructor.class); fail(); } catch (ExceptionWithGoodAndBadConstructor expected) { assertSame(CHECKED_EXCEPTION, expected.getCause()); } }
public void testGetCheckedTimed_withGoodAndBadExceptionConstructor() throws Exception { try { getChecked( FAILED_FUTURE_CHECKED_EXCEPTION, ExceptionWithGoodAndBadConstructor.class, 1, TimeUnit.SECONDS); fail(); } catch (ExceptionWithGoodAndBadConstructor expected) { assertSame(CHECKED_EXCEPTION, expected.getCause()); } }