@Test public void testFindById() { User user = newInstence(); userService.save(user); assertEquals(userService.findById(user.getId()), user); }
public User findById(int id) { User result = userDao.findById(id); return result; }
UserService { public User findById(int id) { User result = userDao.findById(id); return result; } }
UserService { public User findById(int id) { User result = userDao.findById(id); return result; }  }
UserService { public User findById(int id) { User result = userDao.findById(id); return result; }  @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 { public User findById(int id) { User result = userDao.findById(id); return result; }  @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);  }