Testing BadValueError exceptions