PriorityView extends RelativeLayout { public void unSelect() { mTitle.setTextColor(ContextCompat.getColor(getContext(), android.R.color.black)); mBackground.setVisibility(GONE); mBackgroundDisable.setVisibility(VISIBLE); } PriorityView(Context context, AttributeSet attrs);  PriorityView(Context context, AttributeSet attrs, int defStyleAttr); Priority getPriority(); void select(); void unSelect(); void setPriority(Priority priority);  }
@Test public void testUnSelect() throws Exception { mPriorityView.setPriority(Priority.HIGH); mPriorityView.unSelect(); assertTextViewColor(mTitle, android.R.color.black); assertEquals(View.GONE, mBackground.getVisibility()); assertEquals(View.VISIBLE, mBackgroundDisable.getVisibility()); }