• Using assertThrows Method
  • Try/Catch Idiom
  • Specifying the expected annotation via the @Test annotation.
  • ExpectedException Rule