Using Assert.Throws instead of ExpectedException in the tests