MobileNumberEditText extends ErrorEditText { public String getMobileNumber() { return PhoneNumberUtils.stripSeparators(getText().toString()); } MobileNumberEditText(Context context);  MobileNumberEditText(Context context, AttributeSet attrs);  MobileNumberEditText(Context context, AttributeSet attrs, int defStyle); String getMobileNumber(); @Override boolean isValid(); @Override String getErrorMessage();  }
@Test public void getMobileNumber_returnsStrippedMobileNumber() { mView.setText("(555) 555-5555"); assertEquals("5555555555", mView.getMobileNumber()); }