added test code for view favorites
added test code for view favorites