An exception test is a test that looks forward to an exception being thrown inside a test class. It anticipates the @Test annotation followed by the expected exception name. For example, @Test(expectedException = NoSuchElementException.class) is an exception test for missing elements in Selenium.
Note: Keep in mind the syntax, where the exception is suffixed with .class.