That's quite an old fashioned way of testing exceptions, TestNG has allowed you to do the following since 2005:
@Test(expectedExceptions = FooBarException.class)
public void test() {
thisShouldThrow();
}
If the method doesn't throw or throws the wrong kind of exception, this test will fail.