PopCheckBox extends RelativeLayout { public void animateChecked(boolean isChecked) { if (this.isChecked != isChecked) { this.isChecked = isChecked; doAnimation(); } } PopCheckBox(Context context);  PopCheckBox(Context context, AttributeSet attrs);  PopCheckBox(Context context, AttributeSet attrs, int defStyleAttr); void setCheck(boolean isChecked); boolean isChecked(); void animateChecked(boolean isChecked);  }
@Test public void testAnimateCheckedNoAnimation() throws Exception { mPopCheckBox.animateChecked(false); verify(mMockAnimatorCheckBox, never()).start(); verify(mMockAnimatorCheckBoxFill, never()).start(); }
@Test public void testAnimateCheckedTrue() throws Exception { mPopCheckBox.animateChecked(true); verifyCallAnimation(mMockAnimatorCheckBox, 0, 0.0f); verifyCallAnimation(mMockAnimatorCheckBoxFill, 75, 1.0f); }