if (!expectedExceptionClass.isInstance(t)) {
AssertionFailedError afe =
new AssertionFailedError
("Expected " + expectedExceptionClass.getName() +
", got " + t.getClass().getName());
afe.initCause(t);
threadUnexpectedException(afe);
}
}
if (!threw)
shouldThrow(expectedExceptionClass.getName());