CardEditText extends ErrorEditText implements TextWatcher { public void displayCardTypeIcon(boolean display) { mDisplayCardIcon = display; if (!mDisplayCardIcon) { setCardIcon(-1); } } CardEditText(Context context);  CardEditText(Context context, AttributeSet attrs);  CardEditText(Context context, AttributeSet attrs, int defStyle); void displayCardTypeIcon(boolean display); CardType getCardType(); void setMask(boolean mask); void setOnCardTypeChangedListener(OnCardTypeChangedListener listener); @Override void afterTextChanged(Editable editable); @Override boolean isValid(); @Override String getErrorMessage(); @Override void beforeTextChanged(CharSequence s, int start, int count, int after);  }
@Test public void doesNotShowCardTypeIconsWhenDisabled() { mView.displayCardTypeIcon(false); assertNoHintIcon(mView); type("4"); assertNoHintIcon(mView); }