@Test public void shouldSaveAUser() throws Exception { User user = new User(); user.setEmail("abc@def.com"); user.setId(1l); userPersistenceHandler = new UserPersistenceHandler(userService, baseUrl); userPersistenceHandler.save(user); verify(userService).createUser(user, baseUrl + RESET_PASSWORD_PATH); }
@Override protected void save(BaseModel record) { User user = (User) record; userService.createUser(user, baseUrl + RESET_PASSWORD_PATH); }
UserPersistenceHandler extends AbstractModelPersistenceHandler { @Override protected void save(BaseModel record) { User user = (User) record; userService.createUser(user, baseUrl + RESET_PASSWORD_PATH); } }
UserPersistenceHandler extends AbstractModelPersistenceHandler { @Override protected void save(BaseModel record) { User user = (User) record; userService.createUser(user, baseUrl + RESET_PASSWORD_PATH); } @Autowired  UserPersistenceHandler(UserService userService, @Value("${mail.base.url}") String baseUrl); }
UserPersistenceHandler extends AbstractModelPersistenceHandler { @Override protected void save(BaseModel record) { User user = (User) record; userService.createUser(user, baseUrl + RESET_PASSWORD_PATH); } @Autowired  UserPersistenceHandler(UserService userService, @Value("${mail.base.url}") String baseUrl); @Override String getMessageKey(); }
UserPersistenceHandler extends AbstractModelPersistenceHandler { @Override protected void save(BaseModel record) { User user = (User) record; userService.createUser(user, baseUrl + RESET_PASSWORD_PATH); } @Autowired  UserPersistenceHandler(UserService userService, @Value("${mail.base.url}") String baseUrl); @Override String getMessageKey(); static final String RESET_PASSWORD_PATH; }