TweetTextLinkifier { static boolean isPhotoEntity(final FormattedUrlEntity urlEntity) { return urlEntity instanceof FormattedMediaEntity && TweetMediaUtils.PHOTO_TYPE.equals(((FormattedMediaEntity) urlEntity).type); } private  TweetTextLinkifier();   }
@Test public void testIsPhotoEntity_withPhotoUrl() { final MediaEntity mediaEntity = new MediaEntity("http: "pic.twitter.com/abc", 27, 49, 0L, null, null, null, null, 0L, null, "photo", null, ""); final FormattedUrlEntity formattedUrlEntity = new FormattedMediaEntity(mediaEntity); assertTrue(TweetTextLinkifier.isPhotoEntity(formattedUrlEntity)); }