Fixing unit test that was looking for the incorrect exception type