CountryCodeEditText extends ErrorEditText { @Override public String getErrorMessage() { return getContext().getString(R.string.bt_country_code_required); } CountryCodeEditText(Context context);  CountryCodeEditText(Context context, AttributeSet attrs);  CountryCodeEditText(Context context, AttributeSet attrs, int defStyle); String getCountryCode(); @Override boolean isValid(); @Override String getErrorMessage();  }
@Test public void getErrorMessage_returnsErrorMessageWhenEmpty() { assertEquals(RuntimeEnvironment.application.getString(R.string.bt_country_code_required), mView.getErrorMessage()); }