Fix exception type in a setArg test case