Using better types on throw testing. AssertionException is already used.