Improved tests for UserProfile.