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