add tests for retrieveUser