Perhaps adding an `expectedException` annotation to the test method is cleaner?