    @Test
    public void updatePasswordTest() {

        try {
            //创建未加密账户 create unencrypted account
            List<String> accountList = CommonRpcOperation.createAccount(chainId, 1, password);
            String address = accountList.get(0);

            //为未设置密码的账户修改密码 change password for account
            Map<String, Object> params = new HashMap<>();
            params.put(Constants.VERSION_KEY_STR, version);
            params.put(Constants.CHAIN_ID, chainId);
            params.put("address", address);
            params.put("password", password);
            params.put("newPassword", newPassword);
            Response cmdResp = ResponseMessageProcessor.requestAndResponse(ModuleE.AC.abbr, "ac_updatePassword", params);
            //未设置密码不能修改密码，必须先设置密码再修改 No password can be changed, password must be set first, then password should be changed.
            assertNotEquals(AccountConstant.SUCCESS_CODE, cmdResp.getResponseStatus());

            //为账户设置密码 set password for account
            cmdResp = ResponseMessageProcessor.requestAndResponse(ModuleE.AC.abbr, "ac_setPassword", params);
            Map result = (HashMap) ((HashMap) cmdResp.getResponseData()).get("ac_setPassword");
            Boolean value = (Boolean) result.get("value");
            assertTrue(value);

            //为账户修改密码 change password for account
            cmdResp = ResponseMessageProcessor.requestAndResponse(ModuleE.AC.abbr, "ac_updatePassword", params);
            result = (HashMap) ((HashMap) cmdResp.getResponseData()).get("ac_updatePassword");
            value = (Boolean) result.get("value");
            assertTrue(value);

            //使用错误旧密码为账户修改密码 using old password to change password for account
            params.put("password", "errorpwd123");
            cmdResp = ResponseMessageProcessor.requestAndResponse(ModuleE.AC.abbr, "ac_updatePassword", params);
            assertNotEquals(AccountConstant.SUCCESS_CODE, cmdResp.getResponseStatus());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }