### Question:
UserServiceImpl implements UserService { @Override @LogMethod("修改密码") public boolean updatePassword(User user, String oldPassword, String newPassword) { if (user.getPassword().equals(DigestUtil.md5Hex(oldPassword))) { user.setPassword(DigestUtil.md5Hex(newPassword)); save(user, false); return true; } return 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 updatePassword() { assert userService.updatePassword(getUser(), TestConsts.PASSWORD, TestConsts.PASSWORD); }