fixing tests which were asserting the wrong exception type.