Add test cases for avatar logic