Fix the tests to expect an exception

since the code now produces an exception on error instead of returning
some error-code, the tests have to be changed accordingly.
However the error-code of that exception is currently untested