> Also the code is only used for the testing infrastructure and not used in production.

>Most of the time the user can not be retrieved since it does not exists in the system.
> I am not sure if the error is of any help in this case.

Agreed, I was applying generic logic and failed to realize this is just in the tests.