ViewHelper { public static void setBackgroundColor(EfficientCacheView cacheView, int viewId, @ColorInt int color) { View view = cacheView.findViewByIdEfficient(viewId); if (view != null) { view.setBackgroundColor(color); } }  static void setVisibility(EfficientCacheView cacheView, int viewId, int visibility); static void setBackground(EfficientCacheView cacheView, int viewId, Drawable drawable); static void setBackgroundColor(EfficientCacheView cacheView, int viewId,
            @ColorInt int color); static void setBackgroundResource(EfficientCacheView cacheView, int viewId,
            @DrawableRes int resid); static void setTag(EfficientCacheView cacheView, int viewId, Object tag); static void setTag(EfficientCacheView cacheView, int viewId, int key, Object tag); static void setText(EfficientCacheView cacheView, int viewId, CharSequence text); static void setText(EfficientCacheView cacheView, int viewId, @StringRes int resid); static void setTextColor(EfficientCacheView cacheView, int viewId, @ColorInt int color); static void setTextSize(EfficientCacheView cacheView, int viewId, float size); static void setTextSize(EfficientCacheView cacheView, int viewId, int unit, float size); static void setImageResource(EfficientCacheView cacheView, int viewId,
            @DrawableRes int resId); static void setImageDrawable(EfficientCacheView cacheView, int viewId,
            Drawable drawable); static void setImageUri(EfficientCacheView cacheView, int viewId, @Nullable Uri uri); static void setImageBitmap(EfficientCacheView cacheView, int viewId, Bitmap bm);  }
@Test public void testSetBackgroundColor() throws Exception { int color1 = 1; int color2 = 2; int color3 = 3; int color4 = 4; ViewHelper.setBackgroundColor(mCacheView, NULL_VIEW_ID, color1); ViewHelper.setBackgroundColor(mCacheView, VIEW_ID, color2); ViewHelper.setBackgroundColor(mCacheView, IMAGEVIEW_ID, color3); ViewHelper.setBackgroundColor(mCacheView, TEXTVIEW_ID, color4); verify(mView).setBackgroundColor(color2); verify(mImageView).setBackgroundColor(color3); verify(mTextView).setBackgroundColor(color4); verifyNoMoreInteractions(mView, mImageView, mTextView); }