Assert that exceptions are thrown