Why an assert if the call is expected to throw an exception anyway?