test case for retrieve method in User