01: package test.expectedexceptions;
02:
03: import org.testng.annotations.ExpectedExceptions;
04: import org.testng.annotations.Test;
05:
06: public class WrappedExpectedException {
07: @Test(timeOut=1000L)
08: @ExpectedExceptions({IllegalStateException.class})
09: public void testTimeout() {
10: throw new IllegalStateException("expected failure");
11: }
12: }
|