testng

TestNG defines a @Listeners annotation that is analogous to the listeners element in the test suite configuration xml file. This annotation can be put on any class but is not applied only to that class, but uniformly on all the tests in the test suite (which is in line with the purpose of the original XML element but it certainly is confusing to see an annotation on a class that has much wider influence but that single class).