changing expected exception type in tests