### Question:
UserServiceImpl implements UserService { @Override @LogMethod("重置密码") public void resetPassword(String email, String newPassword) { User user = userDAO.getByEmail(email); if (ObjectUtil.isNotNull(user)) { user.setPassword(DigestUtil.md5Hex(newPassword)); save(user, false); } } @Autowired  UserServiceImpl(UserDAO userDAO, RedisTemplate<String, User> userRedisTemplate,
                           CommonService commonService); @Override @LogMethod("更新邮箱") void updateEmail(User user, String email); @Override @LogMethod("更新用户名") void updateUsername(User user, String username); @Override @LogMethod("更新用户头像") void updateAvatar(User user, String avatar); @Override @LogMethod("更新用户信息") void updateInfo(User user, UserInfoVO userInfoVO); @Override @LogMethod("注册用户") void register(RegisterVO registerVO); @Override @LogMethod("重置密码") void resetPassword(String email, String newPassword); @Override @LogMethod("修改密码") boolean updatePassword(User user, String oldPassword, String newPassword); @Override @LogMethod("用户登录") String login(String loginName, String password); @Override User getUserByToken(String token);  }### Answer:
@Test public void resetPassword() { userService.resetPassword(TestConsts.EMAIL, TestConsts.PASSWORD); Assert.assertEquals(DigestUtil.md5Hex(TestConsts.PASSWORD), getUser().getPassword()); }