@Test public void testFindByEmail() { User user = newInstence(); userService.save(user); assertEquals(user, userService.findByEmail(user.getEmail())); }
public User findByEmail(String email) { User result = null; result = userDao.findByEmail(email); return result; }
UserService { public User findByEmail(String email) { User result = null; result = userDao.findByEmail(email); return result; } }
UserService { public User findByEmail(String email) { User result = null; result = userDao.findByEmail(email); return result; }  }
UserService { public User findByEmail(String email) { User result = null; result = userDao.findByEmail(email); 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 findByEmail(String email) { User result = null; result = userDao.findByEmail(email); 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);  }