@Test public final void shouldNotPassBlankEmail() throws Exception { newValue = " "; boolean result = emailValidationService.checkEmail(dataDefinition, fieldDefinition, entity, oldValue, newValue); Assert.assertFalse(result); }
public boolean checkEmail(final DataDefinition dataDefinition, final FieldDefinition fieldDefinition, final Entity entity, final Object oldValue, final Object newValue) { if (newValue == null || newValue.toString().isEmpty()) { return true; } return MailServiceImpl.isValidEmail(newValue.toString()); }
EmailValidationService { public boolean checkEmail(final DataDefinition dataDefinition, final FieldDefinition fieldDefinition, final Entity entity, final Object oldValue, final Object newValue) { if (newValue == null || newValue.toString().isEmpty()) { return true; } return MailServiceImpl.isValidEmail(newValue.toString()); } }
EmailValidationService { public boolean checkEmail(final DataDefinition dataDefinition, final FieldDefinition fieldDefinition, final Entity entity, final Object oldValue, final Object newValue) { if (newValue == null || newValue.toString().isEmpty()) { return true; } return MailServiceImpl.isValidEmail(newValue.toString()); }  }
EmailValidationService { public boolean checkEmail(final DataDefinition dataDefinition, final FieldDefinition fieldDefinition, final Entity entity, final Object oldValue, final Object newValue) { if (newValue == null || newValue.toString().isEmpty()) { return true; } return MailServiceImpl.isValidEmail(newValue.toString()); }  boolean checkEmail(final DataDefinition dataDefinition, final FieldDefinition fieldDefinition, final Entity entity,
            final Object oldValue, final Object newValue); }
EmailValidationService { public boolean checkEmail(final DataDefinition dataDefinition, final FieldDefinition fieldDefinition, final Entity entity, final Object oldValue, final Object newValue) { if (newValue == null || newValue.toString().isEmpty()) { return true; } return MailServiceImpl.isValidEmail(newValue.toString()); }  boolean checkEmail(final DataDefinition dataDefinition, final FieldDefinition fieldDefinition, final Entity entity,
            final Object oldValue, final Object newValue);  }