add tests for avatars code