handler.setLimit(MORE_THAN_ZERO);
handler.setExceptionClasses(Collections.<Class<? extends Throwable>> singleton(RuntimeException.class));
handler.setUseParent(true);
handler.afterPropertiesSet();
RepeatContextSupport parent = new RepeatContextSupport(null);
try {
RepeatContextSupport context = new RepeatContextSupport(parent);
handler.handleException(context, throwable);
context = new RepeatContextSupport(parent);
handler.handleException(context, throwable);
fail("Expected exception.");
}
catch (RuntimeException expected) {
assertSame(throwable, expected);