@Test public void testUpdate() { User user = newInstence(); userService.save(user); user.setPassword("newpassword"); userService.update(user); assertEquals("newpassword", userService.findById(user.getId()) .getPassword()); }
@Transactional(propagation = Propagation.REQUIRED) public User update(User user) { return userDao.update(user); }
UserService { @Transactional(propagation = Propagation.REQUIRED) public User update(User user) { return userDao.update(user); } }
UserService { @Transactional(propagation = Propagation.REQUIRED) public User update(User user) { return userDao.update(user); }  }
UserService { @Transactional(propagation = Propagation.REQUIRED) public User update(User user) { return userDao.update(user); }  @Transactional(propagation = Propagation.REQUIRED) void save(User user); @Transactional(propagation = Propagation.REQUIRED) User update(User user); User findByEmail(String email); User findById(int id); @Transactional void updateNickname(User user, String nickName); }
UserService { @Transactional(propagation = Propagation.REQUIRED) public User update(User user) { return userDao.update(user); }  @Transactional(propagation = Propagation.REQUIRED) void save(User user); @Transactional(propagation = Propagation.REQUIRED) User update(User user); User findByEmail(String email); User findById(int id); @Transactional void updateNickname(User user, String nickName);  }