TweetMediaView extends ViewGroup implements View.OnClickListener { public void setVineCard(Tweet tweet) { if (tweet == null || tweet.card == null || !VineCardUtils.isVine(tweet.card)) { return; } this.tweet = tweet; this.mediaEntities = Collections.emptyList(); clearImageViews(); initializeImageViews(tweet.card); internalRoundedCornersEnabled = false; requestLayout(); } TweetMediaView(Context context);  TweetMediaView(Context context, AttributeSet attrs);   TweetMediaView(Context context, AttributeSet attrs, DependencyProvider dependencyProvider); void setRoundedCornersRadii(int topLeft, int topRight, int bottomRight, int bottomLeft); void setMediaBgColor(int mediaBgColor); void setTweetMediaClickListener(TweetMediaClickListener tweetMediaClickListener); void setPhotoErrorResId(int photoErrorResId); @Override void onClick(View view); void launchVideoPlayer(MediaEntity entity); void launchVideoPlayer(Tweet tweet); void launchPhotoGallery(int mediaEntityIndex); void setTweetMediaEntities(Tweet tweet, List<MediaEntity> mediaEntities); void setVineCard(Tweet tweet);  }
@Test public void testSetTweetMediaEntities_withVine() { final Card sampleVineCard = TestFixtures.sampleValidVineCard(); final Tweet tweetWithVineCard = TestFixtures.createTweetWithVineCard( TestFixtures.TEST_TWEET_ID, TestFixtures.TEST_USER, TestFixtures.TEST_STATUS, sampleVineCard); tweetMediaView.setVineCard(tweetWithVineCard); final OverlayImageView imageView = (OverlayImageView) tweetMediaView.getChildAt(0); assertEquals(View.VISIBLE, imageView.getVisibility()); assertNotNull(imageView.overlay.drawable); assertNull(tweetMediaView.getChildAt(1)); assertNull(tweetMediaView.getChildAt(2)); assertNull(tweetMediaView.getChildAt(3)); }