Test for createOrUpdateUser function