@Test public void shouldThrowErrorOnInvalidEmail() { User user = make(a(defaultUser)); user.setUserName("mohan"); user.setEmail("invalidEmail@asda121"); expectedException.expect(DataException.class); expectedException.expectMessage("user.email.invalid"); user.validate(); }
public void validate() { validateEmail(); validateUserName(); }
User extends BaseModel implements Importable { public void validate() { validateEmail(); validateUserName(); } }
User extends BaseModel implements Importable { public void validate() { validateEmail(); validateUserName(); } User(Long id, String userName);  User(String userName); }
User extends BaseModel implements Importable { public void validate() { validateEmail(); validateUserName(); } User(Long id, String userName);  User(String userName); Boolean isMobileUser(); void validate(); void setPassword(String password); User basicInformation(); }
User extends BaseModel implements Importable { public void validate() { validateEmail(); validateUserName(); } User(Long id, String userName);  User(String userName); Boolean isMobileUser(); void validate(); void setPassword(String password); User basicInformation();  }