IsPositiveInteger implements Validation { @Override public String getErrorMessage(final Context context) { return context.getString(R.string.formvalidations_not_positive_integer); } private  IsPositiveInteger(); static Validation build(); @Override String getErrorMessage(final Context context); @Override boolean isValid(final String text); static final String POSITIVE_INT_PATTERN; }
@Test public void testGetErrorMessage() throws Exception { final String errorMessage = mIsPositiveInteger.getErrorMessage(mActivity); assertNotNull(errorMessage); }