TweetMediaView extends ViewGroup implements View.OnClickListener { void setOverlayImage(OverlayImageView imageView, boolean isVideo) { if (isVideo) { imageView.setOverlayDrawable(getContext().getResources() .getDrawable(R.drawable.tw__player_overlay)); } else { imageView.setOverlayDrawable(null); } } 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 testSetOverlayImage_isVideoTrue() { final OverlayImageView imageView = mock(OverlayImageView.class); tweetMediaView.setOverlayImage(imageView, true); verify(imageView).setOverlayDrawable(any(Drawable.class)); }
@Test public void testSetOverlayImage_isVideoFalse() { final OverlayImageView imageView = mock(OverlayImageView.class); tweetMediaView.setOverlayImage(imageView, false); verify(imageView).setOverlayDrawable(isNull(Drawable.class)); }