TweetMediaView extends ViewGroup implements View.OnClickListener { void clearImageViews() { for (int index = 0; index < imageCount; index++) { final ImageView imageView = imageViews[index]; if (imageView != null) { imageView.setVisibility(GONE); } } imageCount = 0; } 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 testClearImageViews() { final List<MediaEntity> mediaEntities = TestFixtures.createMultipleMediaEntitiesWithPhoto (TweetMediaView.MAX_IMAGE_VIEW_COUNT, 100, 100); tweetMediaView.setTweetMediaEntities(TestFixtures.TEST_TWEET, mediaEntities); tweetMediaView.clearImageViews(); for (int index = 0; index < TweetMediaView.MAX_IMAGE_VIEW_COUNT; index++) { final ImageView imageView = (ImageView) tweetMediaView.getChildAt(index); assertEquals(View.GONE, imageView.getVisibility()); } }