RegistrationService { public void unregister(String email) { int numberOfRows = jdbcTemplate.update( "DELETE FROM T_USER WHERE email=?", email); if (numberOfRows == 0) { log.info(String.format( "Could not unregister - user with email=%s not registered", email)); throw new IllegalArgumentException(String.format( "User with email=%s not registered!", email)); } log.info(String.format("User with email=%s unregistered", email)); }  boolean register(User user); boolean validEMailAdress(String email); User getByEMail(String email); void reset(); void unregister(String email); void clean();  }
@Test(expected=IllegalArgumentException.class) public void nonExistingUserCannotBeUnregistered() { registrationService.unregister("eberhard.wolff@gmail.com"); }