CvvEditText extends ErrorEditText implements TextWatcher { public void setMask(boolean mask) { if (mask) { setTransformationMethod(PasswordTransformationMethod.getInstance()); } else { setTransformationMethod(SingleLineTransformationMethod.getInstance()); } } CvvEditText(Context context);  CvvEditText(Context context, AttributeSet attrs);  CvvEditText(Context context, AttributeSet attrs, int defStyle); void setCardType(CardType cardType); void setMask(boolean mask); @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 setMaskToTrue_appliesPasswordTransformationMethod() { mView.setMask(true); assertSame(mView.getTransformationMethod(), PasswordTransformationMethod.getInstance()); }
@Test public void setMaskToFalse_doesNotApplyPasswordTransformationMethod() { mView.setMask(false); assertSame(mView.getTransformationMethod(), SingleLineTransformationMethod.getInstance()); }