IsEmail implements Validation { @Override public boolean isValid(final String text) { return Patterns.EMAIL_ADDRESS.matcher(text).matches(); } private  IsEmail(); static Validation build(); @Override String getErrorMessage(final Context context); @Override boolean isValid(final String text);  }
@Test public void testSimpleEmailIsValid() throws Exception { assertTrue(mIsEmail.isValid("user@example.org")); }
@Test public void testEmailWithPlusIsValid() throws Exception { assertTrue(mIsEmail.isValid("user+alias@example.org")); }
@Test public void testEmailWithPointsIsValid() throws Exception { assertTrue(mIsEmail.isValid("user.name@example.org")); }