Test that expects an exception if the number is out of range