UserUtils { public static String getProfileImageUrlHttps(User user, AvatarSize size) { if (user != null && user.profileImageUrlHttps != null) { final String url = user.profileImageUrlHttps; if (size == null || url == null) { return url; } switch (size) { case NORMAL: case BIGGER: case MINI: case ORIGINAL: case REASONABLY_SMALL: return url .replace(AvatarSize.NORMAL.getSuffix(), size.getSuffix()); default: return url; } } else { return null; } } private  UserUtils(); static String getProfileImageUrlHttps(User user, AvatarSize size); static CharSequence formatScreenName(CharSequence screenName);  }
@Test public void testGetProfileImageUrlHttps_nullSize() { assertEquals(user.profileImageUrlHttps, UserUtils.getProfileImageUrlHttps(user, null)); }
@Test public void testGetProfileImageUrlHttps_reasonablySmall() { final String reasonableSize = "https: "7df3h38zabcvjylnyfe3_reasonably_small.png"; assertEquals(reasonableSize, UserUtils.getProfileImageUrlHttps(user, UserUtils.AvatarSize.REASONABLY_SMALL)); }