protected abstract void verifyProfile(UserProfile userProfile);
protected void assertCommonProfile(final UserProfile userProfile, final String email, final String firstName,
final String familyName, final String displayName, final String username, final Gender gender,
final Locale locale, final String pictureUrl, final String profileUrl, final String location) {
final CommonProfile profile = (CommonProfile) userProfile;
assertEquals(email, profile.getEmail());
assertEquals(firstName, profile.getFirstName());
assertEquals(familyName, profile.getFamilyName());
assertEquals(displayName, profile.getDisplayName());
assertEquals(username, profile.getUsername());
assertEquals(gender, profile.getGender());
assertEquals(locale, profile.getLocale());
if (pictureUrl == null) {
assertNull(profile.getPictureUrl());
} else {
assertTrue(profile.getPictureUrl().contains(pictureUrl));
}
if (profileUrl == null) {
assertNull(profile.getProfileUrl());
} else {
final String profUrl = profile.getProfileUrl();
assertTrue(profUrl.startsWith(profileUrl));
}
assertEquals(location, profile.getLocation());
}